irst, you need to design, code in Java, test and document a base class, Student. The Student class will have the following information: A. Title of the student (eg Mr, Miss, Ms, Mrs etc) B. A first name (given name) C. A last name (family name/surname) D. Student number (ID) – an integer number (of type long) E. A date of birth (in day/month/year format – three ints) - (Do NOT use the Date class from JAVA) The student class will have at least the following constructors and methods: (i) two constructors - one without any parameters (the default constructor), and one with parameters to give initial values to all the instance variables. (ii) a reasonable number of set and get methods. (iii) methods to compute the final overall mark and the final grade (which will be overridden in the respective child classes). These two methods will be void methods that set the appropriate instance variables. Remember one method can call another method. If you prefer, you can define a single method that sets both the overall mark and the final string grade, but if you do this, use a helper method. (iv) an equals method which compares two student objects and returns true if they have the same student names, and the same date of birth, otherwise it returns false. (v) method to sort the array into ascending order of students’ numbers (IDs) Using the above class also Design, code in Java, test and document (at least) three classes – an UndergraduateStudent class and PostGraduateStudent class (which both derive from the Student class) and a client program. For undergraduate students: (a) There are three assignments, each marked out of a maximum of 100 marks and equally weighted. The marks for each assignment are recorded separately. (b) There is weekly practical work. The marks for this component are recorded as a total mark obtained (out of a maximum of 10 marks) for all practical work demonstrated during the semester. (c) There is one final examination that is marked out of a maximum of 100 marks and recorded separately. (d) An overall mark (to be calculated within the program) (e) A final grade, which is a string (to be calculated within the program) The final grade, for undergraduate students, is to be awarded on the basis of an overall mark, which is a number in the range 0 to 100 and is obtained by calculating the weighted average of the student's performance in the assessment components. The criteria for calculating the weighted average is as defined below: The three assignments together count for a total of 45% (15% each) of the final grade, the practical work is worth 10%, and the final exam is worth 45% of the final grade. For postgraduate students: (a) There is one group assignment. (b) A group presentation (c) There is one final examination that is marked out of a maximum of 100 marks and recorded separately. (d) An overall mark (to be calculated within the program) (e) A final grade, which is a string (to be calculated within the program) The final grade, for postgraduate students, is to be awarded on the basis of an overall mark, which is a number in the range 0 to 100 and is obtained by calculating the weighted average of the student's performance in the assessment components. The criteria for calculating the weighted average is as defined below: The group assignment is worth 30% of the final grade, the group presentation is worth 20%, and the final exam is worth 50% of the final grade A grade is to be awarded for undergraduate and postgraduate students as follows: An overall mark of 80 or higher is an HD, an overall mark of 70 or higher (but less than 80) is a D, an overall mark of 60 or higher (but less than 70) is a C, an overall mark of 50 or higher (but less than 60) is a P, and an overall mark below 50 is an N. The client program will allow entry of these data for several different student into an array and then perform some analysis and queries. Your client class (program) will provide the user with a menu to perform the following operations. You will need to think of a way to ask the user whether they are dealing with the Undergraduate student or Postgraduate student before going into the appropriate menu. You will also need to load the information of the students from a text file (student.txt) before displaying the menu. 1. Quit (exit the program) 2. Add (to the array) all information about an undergraduate or postgraduate student (except the overall mark and the grade) by reading it from the keyboard or from another text file and determine the student’s overall mark and grade. 3. Output from the array the details (all information including the overall mark and the grade) of all students currently held in the array 4. Compute and output the average overall mark for undergraduate or postgraduate students 5. Determine and display how many undergraduate or postgraduate students obtained an overall mark equal to or above the average overall mark and how many obtained an overall mark below the average overall ma

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 2E
icon
Related questions
Question

First, you need to design, code in Java, test and document a base class, Student. The Student class will have the following information:

A. Title of the student (eg Mr, Miss, Ms, Mrs etc)
B. A first name (given name)
C. A last name (family name/surname)
D. Student number (ID) – an integer number (of type long)
E. A date of birth (in day/month/year format – three ints) - (Do NOT use the Date class from JAVA)

The student class will have at least the following constructors and methods:
(i) two constructors - one without any parameters (the default constructor), and one with parameters to give initial values to all the instance variables.
(ii) a reasonable number of set and get methods.
(iii) methods to compute the final overall mark and the final grade (which will be overridden in the respective child classes). These two methods will be void methods that set the appropriate instance variables. Remember one method can call another method. If you prefer, you can define a single method that sets both the overall mark and the final string grade, but if you do this, use a helper method.
(iv) an equals method which compares two student objects and returns true if they have the same student names, and the same date of birth, otherwise it returns false.
(v) method to sort the array into ascending order of students’ numbers (IDs)

Using the above class also Design, code in Java, test and document (at least) three classes – an UndergraduateStudent class and PostGraduateStudent class (which both derive from the Student class) and a client program.

For undergraduate students:
(a) There are three assignments, each marked out of a maximum of 100 marks and equally weighted. The marks for each assignment are recorded separately.
(b) There is weekly practical work. The marks for this component are recorded as a total mark obtained (out of a maximum of 10 marks) for all practical work demonstrated during the semester.
(c) There is one final examination that is marked out of a maximum of 100 marks and recorded separately.
(d) An overall mark (to be calculated within the program) (e) A final grade, which is a string (to be calculated within the program)

The final grade, for undergraduate students, is to be awarded on the basis of an overall mark, which is a number in the range 0 to 100 and is obtained by calculating the weighted average of the student's performance in the assessment components. The criteria for calculating the weighted average is as defined below: The three assignments together count for a total of 45% (15% each) of the final grade, the practical work is worth 10%, and the final exam is worth 45% of the final grade.

For postgraduate students:
(a) There is one group assignment.
(b) A group presentation
(c) There is one final examination that is marked out of a maximum of 100 marks and recorded separately.
(d) An overall mark (to be calculated within the program)
(e) A final grade, which is a string (to be calculated within the program)

The final grade, for postgraduate students, is to be awarded on the basis of an overall mark, which is a number in the range 0 to 100 and is obtained by calculating the weighted average of the student's performance in the assessment components. The criteria for calculating the weighted average is as defined below: The group assignment is worth 30% of the final grade, the group presentation is worth 20%, and the final exam is worth 50% of the final grade

A grade is to be awarded for undergraduate and postgraduate students as follows: An overall mark of 80 or higher is an HD, an overall mark of 70 or higher (but less than 80) is a D, an overall mark of 60 or higher (but less than 70) is a C, an overall mark of 50 or higher (but less than 60) is a P, and an overall mark below 50 is an N.

The client program will allow entry of these data for several different student into an array and then perform some analysis and queries.

Your client class (program) will provide the user with a menu to perform the following operations. You will need to think of a way to ask the user whether they are dealing with the Undergraduate student or Postgraduate student before going into the appropriate menu. You will also need to load the information of the students from a text file (student.txt) before displaying the menu.

1. Quit (exit the program)
2. Add (to the array) all information about an undergraduate or postgraduate student (except the overall mark and the grade) by reading it from the keyboard or from another text file and determine the student’s overall mark and grade.
3. Output from the array the details (all information including the overall mark and the grade) of all students currently held in the array
4. Compute and output the average overall mark for undergraduate or postgraduate students
5. Determine and display how many undergraduate or postgraduate students obtained an overall mark equal to or above the average overall mark and how many obtained an overall mark below the average overall mark

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT