Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Chapter 2 
Lab 2 
Accepting User Input Pages 82 – 83 
Adding String Input Pages 83 – 85  
Using Arithmetic Operators Pages 96 – 97  
Performing Floating-Point Arithmetic Page 98 
Implicit and Explicit Casting Pages 102 – 104  
 
 
Instructions: 
 
This lab is made up of multiple assignments from the book.  Make the following changes to 
the instructions shown in your text book: 
 
Accepting User Input 
Page 82 – Step 1 
 Right click the IntegerDemo_Yourinitials.java file using the Package Explorer section of 
Eclipse and choose the copy option 
 
 Right click the package IntegerDemo_Yourinitials.java is located in using the Package 
Explorer section of Eclipse and choose the paste option 
 
  When prompted rename the file IntegerDemoInteractive_Yourinitials 
Page 82 – Step 3 
 After completing the step as it is written in your text book remove the following two 
lines from the code: 
o int anotherInt = anInt * 10000000; 
o System.out.println("Another int is " + anotherInt); 
 
Adding String Input  
Page 83 – Step 1 
 Use the procedure shown earlier in these instructions to create a copy of the 
IntegerDemoInteractive_Yourinitials.java file named 
IntegerDemoInteractiveWithName_Yourinitials. 
 
Using Arithmetic Operators  
Page 96 – Step 1 
 Name your class ArithmeticDemo_YourInitials  
 
Performing Floating-Point Arithmetic  
Page 98 – Step 1 
Use the procedure shown earlier in these instructions to create a copy of the 
ArithmeticDemo_Yourinitials.java file named ArithmeticDemo2_Yourinitials 
 
Implicit and Explicit Casting  
Page 102 – Step 1 
Use the procedure shown earlier in these instructions to create a copy of the 
ArithmeticDemo_Yourinitials.java file named ArithmeticDemo3_Yourinitials 
 
Turn in the files IntegerDemoInteractive_Yourinitials.java, 
IntegerDemoInteractiveWithName_Yourinitials.java, ArithmeticDemo_YourInitials, 
ArithmeticDemo2_YourInitials and ArithmeticDemo3_YourInitials. 
 
Grading: 
 
2 – General, compiles, comments, proper indentation, etc 
2 – IntegerDemoInteractive_Yourinitials.java 
2 – IntegerDemoInteractiveWithName_Yourinitials.java 
2 – ArithmeticDemo_Yourinitials.java 
2 – ArithmeticDemo2_Yourinitials.java 
2 – ArithmeticDemo3_Yourinitials.java