「java英文题」java英文面试题
本篇文章给大家谈谈java英文题,以及java英文面试题对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
一道java英文题,急求翻译!
创建一个类:员工。本课程将有2个字符串变量)FNAME,B)L-NAME
1长变量)_ID,1 int变量工作日,5浮点型变量a)基本,B)HRA,C)的TA,D),PF,C)网。所有这些变量都是私有的。此外getter和为_ID,FNAME,L-NAME,基本setter方法。
吸气剂的方法被用来从这些变量的值。这些getter方法是公开的。设置方法是用来存储在这些变量的值。这些setter方法是公开的。还可以创建一个方法calculateSalary(),这将计算净工资的基础上给出规则的员工。
1,基本=基本*个工作日
基本2 HRA=40%
3,助教=10%(基本+ HRA)
4,PF的为12.5%(基本+ HRA+ TA)
五,净利润=(基本+ HRA+ TA) - PF
变量: -
私人字符串FNAME,LNAME
私人长期_ID
私人诠释工作日
私人持股量基本,HRA,助教,PF,网
方法: -
公共无效set_ID(长_ID)
众长get_ID()
公共无效setfName(字符串FNAME)
公共字符串getfName()
公共无效setlName(字符串L-NAME)
公共字符串getlName()
公共无效setBASIC(浮点BASIC)
公众持股量getfBASIC()
公共无效calculateSalary()
将文件另存为“Employee.java”
创建一流企业:该类会有的主要方法与另一种称为无效genID()方法,生成员工编号。海因: - 使用Math类的random方法来创建员工ID。
从主要方法要求用户输入名字,姓氏,每日工资和工作的天数。它们存储在使用setter方法Employee类的相应的变量。然后调用这个类Employee类的话calculateSalary()方法genID()方法。创建5 Employee对象,并将其存储在员工的数组。然后打印出所有员工的详细列表。
一道基础java的Assignment求解(英文题)
这么长的一个题目,我说说我的思路吧。这类面试题当然第一个是英语的测试,第二个是对JAVA的理解,特别是OOP。
在学生这个类中属性把题目的 name 、courseworkScore 、examScore 、scoreHurdle(建议)。
菜单,可以简单的用DOS的提示就行了,别搞界面了,,只靠TXT我是记不住的。其他的 注意它后面的要求,用数组装学生吧。
目测还有很多细节。。我只能说修改修改就完成了。。。
求Java大神帮忙解决这三道英文的java题
2. Write a program that uses a scanner object to read a double value that represents a temperature in degrees Celcius.
The program then computes and prints the equivalent temperature in degrees Farenheit.
[Obtain the conversion formula on the web.]
用一个扫描器(在java中呢,就是Scanner对象了),读取一个表示摄氏度的Double类型的值,然后程序将其转换成华氏度,并打印出来。
Sample output:
输出的样本:
Please type a temperature in degrees Celcius: ..
请输入摄氏度:..
.. C = .. F
(C代表摄氏度 F代表华氏度)
Test the program with three sets of data and include the results in this report. Do not concern yourself with controlling the display of the decimal point.
在这份报告中需要包含三组数据和测试结果。显示的小数位数你不用关心(也就是说可以由你指定)
Solution (program):
解决方案(程序):
Output
输出
3. Write a program that uses a scanner object to read a value in $CA (Canadian Dollars). The program computes the equivalent amount in Euro and the equivalent in US dollars. The program then writes the result in the following form:
写一个程序,用扫描器对象读取加拿大元。然后程序等价转换为欧元和美元。随后程序按照下面的格式写出结果:
Please type a value in $CA: ..
请键入加拿大元:..
.. $CA = .. EUR = .. $US
You need to decide whether the variables should be of type int or double. Test the program with three sets of data and include the results in this report. Do not concern yourself with controlling the display of the decimal point.
你需要决定变量时Int类型还是Double类型。在这份报告中需要包含三组数据和测试结果。显示的小数位数随意。
Solution (program):
解决方案(程序):
Output
输出
4. Write a program that reads the cost of an item in $CA. The program then reads the GST tax rate as a percentage. The program then computes the sales tax on the cost. The program then computes the total amount payable and assigns the value to a variable of that name. The program then prints the tax payable and total amount payable in $CA and Euros. Test the program with three sets of data and include the results in this report. Do not concern yourself with controlling the display of the decimal point.
写一个程序读取用加拿大元表示的项目成本(也就是说,有一个项目花费了多少多少元,但是是按照加拿大元计算的)。然后程序程序读取增值税率。然后程序计算出花了多少税。然后程序计算出总共应付多少钱,把总共花的钱指定给一个变量。然后程序需要按照加拿大元和欧元打印出需要付的税和总金额。在这份报告中需要三组测试数据和测试结果。显示的小数位数随意。
Sample output:
输出示例:
Please type the cost in $CS: ..
请键入花费(按加拿大元):..
Please type the GST rate: ..
请键入增值税率:..
Total Sales Tax payable: ..
需要付的增值税:
Total Amount payable: .. $CA or .. EUR.
需要付的总金额:..(按加拿大元或者美元都行)
Solution (program):
解决方案(程序):
Output
输出
参考代码:
package cn.stock.entity;
public class Test {
public static void main(String[] args) {
//对于需求一
cTof(32.1);
cTof(30);
cTof(32.2);
//对于需求二
convertDollar(800);
convertDollar(810);
convertDollar(820.88);
//对于需求三
caclAccount(3200.0,0.56);
caclAccount(3100.0,0.56);
caclAccount(3220.3,0.56);
}
//摄氏度转换为华氏度
public static void cTof(double tempC){
//华氏度 = 32 + 摄氏度 × 1.8
double tempF=32+1.8*tempC;
System.out.println(tempF);
}
//加元分别转换为欧元和美元
public static void convertDollar(double CA){
//1欧元=1.4083加元
double europ=1.4083*CA;
//1美元=1.1161加元
double usa=1.1161*CA;
System.out.println("转换为美元是:"+europ+"\n转换为欧元是:"+usa);
}
public static void caclAccount(double cost,double gstax){
//计算花费的税
double tax=cost*gstax;
//计算总共付的钱
double allCost=cost+tax;
//按照加拿大元输出(直接输出,即可,因为你传入的就是加元)
System.out.println("税:"+tax+"\t总共应付:"+allCost);
//按照欧元输出,首先要转换,乘以1.4083即可
System.out.println("欧元格式,税:"+tax*1.4083+"\t总共应付:"+allCost*1.4083);
}
}
关于java英文题和java英文面试题的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。
发布于:2022-11-25,除非注明,否则均为
原创文章,转载请注明出处。