use java (ArrayList, inheritance, polymorphism, File I/O and basic Java) Student class: First, you need to design, code in Java, test and document a base class, Student. The Student class will have the following information, and all of these should be defined as Private: A first name (given name) A last name (family name/surname) Student number (ID) – an integer number (of type long) 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 of Student. (ii)  only necessary set and get methods for a valid class design. (iii)  a reportGrade method, which you have nothing to report here, you can just print to the screen a message “There is no grade here.”. This method will be overridden in the respective child classes. (iv)  an equals method which compares two student objects and returns true if they have the same student number (ID), otherwise it returns false. You may add other methods in the Student class as you see appropriate, however you will need to justify why those methods are required. Design, code in Java, test and document (at least) the following classes – a Student_Course class, a Student_Research class (both derived from the Student class) a Unit_Course class, Research class (both derived from the Unit class specified below) and a Client class. Assuming in this program, you allow multiple student objects to be created (i.e. arraylist of student objects). For course work students (Student_Course class): (a)  Contain enrolment type. (b)  Provide a reportGrade method such that will output “C” (to identify as course work student), the Name (first name and last name), student number, the unit ID, the overall mark, and the final grade of the student. For research students (Student_Research class): (a)  Contain enrolment type. (b)  Provide a reportGrade method such that will output “R” (to identify as research student), the Name (first name and last name), student number, the overall mark, and the final grade of the student. Unit class: (a) Enrolment type: “C” for course work enrolment and “R” for research enrolment. (b) A final grade reporting method for reporting the “NA” for not available. Course work unit (Unit_Course class): (a)  Will have the information of the unit ID (of type string; e.g. ICT333), and the level of the unit (of type integer; e.g. 3 for third year) (b)  There are two assignments, each marked out of a maximum of 100 marks and equally weighted. The marks for each assignment are recorded separately. (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 class) (e)  A final grade, which is a string (avoid code duplication for calculating this) final grade is 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 two assignments together count for a total of 60% (30% each) of the final grade, and the final exam is worth 40% of the final grade. A grade is to be awarded for the students as follows: 80 or higher is an HD,  70 or less than 80 is a D,  60 or  less than 70) is a C, 50 or less than 60) is a P, and below 50 is an N. Research enrolment (Research class): (a) Enrolment type as “R” (b) There is a proposal, marked out of a maximum of 100 mark. (c) There is a final dissertation, marked out of a maximum of 100 mark. (d) An overall mark (to be calculated within the class) (e) A final grade, which is a string (avoid code duplication for calculating this) The final grade based an overall mark, between (0 to 100) & is obtained by calculating weighted average of the assessment components. The criteria is as defined below: proposal is worth 40% of the final grade, & final dissertation is worth 60% of the final grade. A grade is to be awarded for the students as follows: 80 or higher is an HD,  70 or less than 80 is a D,  60 or  less than 70) is a C, 50 or less than 60) is a P, and below 50 is an N. Client Class will allow entry of these data for several different student into an ArrayList and then perform some analysis and queries.  provide the user a menu to perform the following**.  need to load the information of the students from a CSV file (student.csv) before displaying the menu. only need 1 ArrayList & 1 menu for this. in the csv file, first item can be C or R to differentiate the entry is a Student_Course object, or a Student_Research object. You can then decide how you want other data to be listed in the csv file.  ***The menu is in the image attached! Note that the program will loop around until the user selects the first option (Quit). You should use 5 coursework students and 5 research students in your test. Consider all possible enrolment types in your test.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

use java (ArrayList, inheritance, polymorphism, File I/O and basic Java)

Student class:

First, you need to design, code in Java, test and document a base class, Student. The Student class will

have the following information, and all of these should be defined as Private:

  1. A first name (given name)

  2. A last name (family name/surname)

  3. Student number (ID) – an integer number (of type long)

The Student class will have at least the following constructors and methods:

  1. (i)  two constructors - one without any parameters (the default constructor), and one with

    parameters to give initial values to all the instance variables of Student.

  2. (ii)  only necessary set and get methods for a valid class design.

  3. (iii)  a reportGrade method, which you have nothing to report here, you can just print to the screen

    a message “There is no grade here.”. This method will be overridden in the respective child

    classes.

  4. (iv)  an equals method which compares two student objects and returns true if they have the same

    student number (ID), otherwise it returns false.

You may add other methods in the Student class as you see appropriate, however you will need to justify why those methods are required.

Design, code in Java, test and document (at least) the following classes –

  • a Student_Course class, a Student_Research class (both derived from the Student class)

  • a Unit_Course class, Research class (both derived from the Unit class specified below)

  • and a Client class.

    Assuming in this program, you allow multiple student objects to be created (i.e. arraylist of student objects).

    For course work students (Student_Course class):

  1. (a)  Contain enrolment type.

  2. (b)  Provide a reportGrade method such that will output “C” (to identify as course work student), the Name (first name and last name), student number, the unit ID, the overall mark, and the final grade of the student.

For research students (Student_Research class):

  1. (a)  Contain enrolment type.

  2. (b)  Provide a reportGrade method such that will output “R” (to identify as research student), the Name (first name and last name), student number, the overall mark, and the final grade of the student.

Unit class:

(a) Enrolment type: “C” for course work enrolment and “R” for research enrolment.

(b) A final grade reporting method for reporting the “NA” for not available.

Course work unit (Unit_Course class):

  1. (a)  Will have the information of the unit ID (of type string; e.g. ICT333), and the level of the unit (of type integer; e.g. 3 for third year)

  2. (b)  There are two assignments, each marked out of a maximum of 100 marks and equally weighted. The marks for each assignment are recorded separately.

  3. (c)  There is one final examination that is marked out of a maximum of 100 marks and recorded separately.

  4. (d)  An overall mark (to be calculated within the class)

  5. (e)  A final grade, which is a string (avoid code duplication for calculating this)

final grade is 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 two assignments together count for a total of 60% (30% each) of the final grade, and the final exam is worth 40% of the final grade.

A grade is to be awarded for the students as follows: 80 or higher is an HD,  70 or less than 80 is a D,  60 or  less than 70) is a C, 50 or less than 60) is a P, and below 50 is an N.

Research enrolment (Research class):

(a) Enrolment type as “R”
(b) There is a proposal, marked out of a maximum of 100 mark.
(c) There is a final dissertation, marked out of a maximum of 100 mark. (d) An overall mark (to be calculated within the class)

(e) A final grade, which is a string (avoid code duplication for calculating this)

The final grade based an overall mark, between (0 to 100) & is obtained by calculating weighted average of the assessment components. The criteria is as defined below:

proposal is worth 40% of the final grade, & final dissertation is worth 60% of the final grade.

A grade is to be awarded for the students as follows: 80 or higher is an HD,  70 or less than 80 is a D,  60 or  less than 70) is a C, 50 or less than 60) is a P, and below 50 is an N.

Client Class

will allow entry of these data for several different student into an ArrayList and then perform some analysis and queries.

 provide the user a menu to perform the following**.  need to load the information of the students from a CSV file (student.csv) before displaying the menu. only need 1 ArrayList & 1 menu for this. in the csv file, first item can be C or R to differentiate the entry is a Student_Course object, or a Student_Research object. You can then decide how you want other data to be listed in the csv file. 

***The menu is in the image attached!

Note that the program will loop around until the user selects the first option (Quit).

You should use 5 coursework students and 5 research students in your test. Consider all possible enrolment types in your test.

 

1.
Quit (exit the program)
2. Add (to the ArrayList) all the marks information about a course work student or a research
student by reading it from another CSV file. Your program will ask for the file name.
3. Given student number (ID), remove the specified student and relevant information from the
ArrayList. It is always good to ask the user to confirm again before removing the record. For
confirmation, output the student number (ID) and the name to the user.
Output all details currently held in the ArrayList.
Determine and display how many course work 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. Note: You only need to perform this task on course work students only.
4.
5.
6. Given a student number (ID), report the grade information (using reportGrade) of the student
with that number. If the student is not found in the ArrayList, an appropriate error message is
to be displayed
7. Sort the ArrayList of the student objects into ascending order of the students' numbers (IDs),
and output the sorted array - implement bubble sort algorithm for this, and explain how this
sorting algorithm is different to the insertion sort algorithm (in external documentation).
8. Output the sorted ArrayList from (7) to a CSV file. If the ArrayList is not sorted, this option
cannot be selected. Remember to include the identification of whether the student is course
work student (C) or research student (R).
Transcribed Image Text:1. Quit (exit the program) 2. Add (to the ArrayList) all the marks information about a course work student or a research student by reading it from another CSV file. Your program will ask for the file name. 3. Given student number (ID), remove the specified student and relevant information from the ArrayList. It is always good to ask the user to confirm again before removing the record. For confirmation, output the student number (ID) and the name to the user. Output all details currently held in the ArrayList. Determine and display how many course work 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. Note: You only need to perform this task on course work students only. 4. 5. 6. Given a student number (ID), report the grade information (using reportGrade) of the student with that number. If the student is not found in the ArrayList, an appropriate error message is to be displayed 7. Sort the ArrayList of the student objects into ascending order of the students' numbers (IDs), and output the sorted array - implement bubble sort algorithm for this, and explain how this sorting algorithm is different to the insertion sort algorithm (in external documentation). 8. Output the sorted ArrayList from (7) to a CSV file. If the ArrayList is not sorted, this option cannot be selected. Remember to include the identification of whether the student is course work student (C) or research student (R).
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 7 images

Blurred answer
Knowledge Booster
Adjacency Matrix
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education