Java programming

2014-01-10 7:01 am
The Magellan School for Sailingoffers classes in a numberof subjects relevant to would-be sailors. For each subject, a student will undertake several assignments. To complete an assignment, a student will submit one homework paper, and then take a short examination, for which marks between 0 and 100 will be given.Allow a single studentto record resultsfor more than one subject.For example, letIlene Tan enter results for both Blue-water Navigation and Chart-reading.Whengrades forall subjects have been entered, calculate anoverall grade (using the same criteria as forindividual subjects). Write a program in Java which can do the following:

INPUT
(1) Read in fromthe keyboard a singlestudent’s Registration Number (an integer between 500 and 5000).
(2) Read in fromthe keyboard the student’sfirst and family names.
(3) Read in the student’s subjectnumber, after offeringa menu showing subjects and corresponding numbers.
(4) Read in the number of assignments for which the studentwants to enter his
or her final homeworkand examination marks. This willalways bea whole
number (an integer) between 1 and 4.
(5) For each assignment, read inthe final homework mark, and the final
examination mark (these may bedecimal – ‘real’numbers).

OUTPUT
The program should print out thestudent’s details, as entered, and then:
(a) Calculate and display the student’saverage (mean)homeworkmark.
(b) Calculate and display the student’saverage (mean) examination mark.
(c) Calculate and display the student’s average overall mark:this is based on
taking 20% of the average homework mark and adding it to 80% of the average
examination mark.
(d) Calculate a letter grade for the student, basedon the following mark
boundaries:

A 75andabove
B 60to 74
C 50to 60
D 40to 50
E 35to 40

回答 (1)

2014-01-10 9:22 pm
✔ 最佳答案
No one is going to do your homework for you!


收錄日期: 2021-04-23 23:07:33
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20140109000051KK00238

檢視 Wayback Machine 備份