Java程序辅导

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

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Short description on how to use test cases for your lab or assignments 
1. For some labs and assignments, we provide two test cases, namely input1.txt (test case #1) and 
input2.txt (test case #2) 
2. After you finish writing a program for a lab or an assignment, run and test your program by 
using the data inside above input1.txt or input2.txt as user input (i.e enter the data from keyboard 
when run/test the program). 
3. Record your program’s output on a piece of paper. 
4. Compare your program’s output with our solution output provided, namely output1.txt for test 
case #1 and ouput2.txt for test case #2, they should be identical. If not, you will need to check 
and change your original source code accordingly. 
5. After your program compile and runs perfectly for both test cases, before submit it on 
submission server, you will need to comment out ALL the user prompt part of the original source 
code. 
User prompts are the lines of System.out.println statements where it asks you to enter some data 
from keyboard, such as the following:  
System.out.println("Please enter the first test grade: "); 
You will need to comment it out by putting // in front of the line (see the following) 
// System.out.println("Please enter the first test grade: "); 
The reason for this is: when you submit the program on our submission server, the server already 
has all the input files, namely input1.txt or input2.txt and it doesn’t need to read these messages, 
instead it will compile and run your submitted program with these inputs automatically, and 
show the output on screen if there are no errors.  
6. Be careful that you just need to comment out those System.out.println statements where the 
program asks the user to enter data from keyboard, do NOT comment out those print or println 
statements where it shows the program’s outputs, such as the following lines:  
System.out.println("Test average:\t" + average); 
7. For submission: 
You just need to submit the source codes, which are files with .java file extension. Do NOT  
submit any test cases files, such as input1.txt, output1.txt, or any .class files.