首页 > > 详细

讲解留学生Java、Java讲解、辅导Java编程、Java编程讲解、辅导Java编程

Notice to Students
1. This assignment should be written by individual student. All downloaded materials are not
allowed.

2. Plagiarism will be treated seriously. All assignments that have been found involved wholly
or partly in plagiarism (no matter these assignments are from the original authors or from
the plagiarists) will score ZERO marks.

3. Your program should use Java JDK8 or above and NetBeans to develop.

4. Your program must be structured and well commented.

The first few lines in the source file must be comments stating the name of the source file,
student name, student ID, course name, course code, and brief description of your
program.

/********************************************************
Name of Source File: xxxxx.java

Student Name (ID): Chan Tai Man (141414141)

Course Name (Code): HD in MAD (IT114112)

Program Description:
This program is . . . . . . .
. . . . .
. . . . .
********************************************************/

Marks will be deducted if such comments are not included.


5. You are required to hand a zip file containing the NetBeans project

6. Weight of this assignment is 20% of the module total assessment.

ITE3101 Introduction to Programming Assignment (2017/18)
Page 2
Generating a Student Report

Background

A final mark of a student consists of four sub marks: CA lab mark, CA test mark, EA
assignment mark, and EA test mark.

The following formula is used to calculate a student’s final mark:

Final_Mark = CA_Test_Mark x 0.2 + CA_Lab_Mark x 0.3 + EA_Test_Mark x 0.3 +
EA_Assignemt_Mark x 0.2

To determine if a student passes, the student need to achieve an attendance of at least 70% and a
final mark of 40%.

Requirements

Given a text file “StudentsData.csv” of student data sample with 6 columns of data, write a Java
program that reads the file, check if each line of record has all the column data, calculates the
final mark of each student, and output the average, highest, and lowest marks of the students.
The program will also indicate the reason of failing (either attendance <70% or final mark
<40%). Assume there are no more than 50 students in a class.

Below is the supplied sample data in “StudentsData.csv”:

Wong Ka Lung;39;77.9;88;80.1;92.3
Lee Chun Sing;35.7;80.5;91.8;85;85.5
Cheung Chi Ling;33.4;76.2;75;70;66.2
Lau Mei Yan;36.8;50;65.3;62.4;71.1
Chan Fong Wa;39;64.7;82.6;60;80.9
Yeung Kwok Sun;39;46.8;60;55.2;74.6
Kwok Siu Fong;26;60.3;72.5;65.6;80
Chiu Wai Hung;29;46.4;37.1;20.7;53.4
Ng Ka Kei;34.7;35;66.3;;61.3
Chau Wai Chun;39;66.8;74.7;72.8;77.8

Tasks

1. Write appropriate methods to do the following tasks, one method for each:

- Read the “StudentsData.csv” file and check if each line has filled in all the column
before assigning them in to five different arrays. Output message if information is
missing.

- Calculate the final marks, average mark, highest mark, and lowest mark of the
students.

- Display result according to the sample output.


ITE3101 Introduction to Programming Assignment (2017/18)
Page 3
2. “StudentsData.csv” consists of 6 columns of data. The delimiter “;” is used.

-The first column is student’s name.
-The second column is the attendance hours of the student. (Max 39 hours)
-The third column is the CA test mark of the student.
-The forth column is the CA lab mark of the student.
-The fifth column is the EA test mark of the student.
-The sixth column is the EA assignment mark of the student.

For example, the first line of “StudentsData.csv”:

Wong Ka Lung;39;77.9;88;80.1;92.3

Student name = Wong Ka Lung
Attendance = 39
CA test mark = 77.9
CA lab mark = 88
EA test mark = 80.1
EA assignment mark = 92.3

3. Sample Output:

Data file line number 9 is missing some information!

Wong Ka Lung achieved an attendance of 100.00, a final mark of: 84.47
Lee Chun Sing achieved an attendance of 91.54, a final mark of: 86.24
Cheung Chi Ling achieved an attendance of 85.64, a final mark of: 71.98
Lau Mei Yan achieved an attendance of 94.36, a final mark of: 62.53
Chan Fong Wa achieved an attendance of 100.00, a final mark of: 71.90
Yeung Kwok Sun achieved an attendance of 100.00, a final mark of: 58.84
Kwok Siu Fong achieved an attendance of 66.67, a final mark of: 69.49
Chiu Wai Hung achieved an attendance of 74.36, a final mark of: 37.30
Chau Wai Chun achieved an attendance of 100.00, a final mark of: 73.17

Average mark of the class is: 68.44
Highest mark is: 86.24, achieved by Lee Chun Sing
Lowest mark is: 37.30, achieved by Chiu Wai Hung

Kwok Siu Fong failed because of attendance <70%
Chiu Wai Hung failed because of final mark <40%


Assessment scheme

- Problem solving technique, e.g. algorithms (15 marks)
- Java programming technique, e.g. statements, control structures, etc. (15 marks)
- Programming style, e.g. naming, comments, etc. (10 marks)


--- END ---
 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!