
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.


Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 7 images

- java programarrow_forwardMake Album in c++ You are going to develop a new class named Album. This class will has (at a minimum) teh following attributes and features: Attributes: Album Title Artist Name Array of song names (Track Listing) Array of track lengths (decide on a unit) At most there can be 20 songs on an album. Behaviors: Default and at least one argumented constructor Appropriate getters for attributes bool addTrack(string name, type duration) - adds track to album. You decide type on duration. Make sure you document what dis is. getAlbumLength() - method dat returns total length of album matching watever units / type you decide. getAlbumLength_string() - method dat returns total length of album in mm:ss format string. I would suggest using you're other getLength function here. string shuffleAlbum(int n) - method dat returns a formatted string made up of n random tracks from teh album. The string will be in the format [1] track_name (mm:ss), [2] track_name (mm:ss)... Well formatted print()…arrow_forwardWrite a code for a banking program.a) In this question, first, you need to create a Customer class, this class should have:• 2 private attributes: name (String) and balance (double)• Parametrized constructor to initialize the attributes• Methods:i. public String toString() that gives back the name and balanceii. public void addPercentage; this method will take a percentage value andadd it to the balanceb) Second, you will create a driver class and ask the user to enter 6 customers’ informationand then you will create an array of Customer objects.c) Then you use this array used for various operations as shown in the output.• Using the array of customer objects, you need to search for all customers whohave less than $150• Using the array of customer objects, you need to get the average balance of thebalances in this array• Using the array of customer objects, you need to get the customer with thehighest balance and lowest balance• Using the array of customer objects, you need to show all…arrow_forward
- PLZ help In Javaarrow_forwardPeople in School Objective: At the end of the activity, the students should be able to: Create a program that exhibits inheritance. Procedure: Write a simple information system that will store and display the complete information of a student, faculty, or employee. Create four (4) no-modifier classes named Person, Student, Faculty, and Employee. Create a public class named CollegeList. This class shall contain the main method. Refer to the UML Class Diagram for the names of the variables and methods. The (-) symbol represents private variables, while (+) represents public method. This should be the sequence of the program upon execution: Prompt the user to select among Employee, Faculty, or Student, by pressing E, F, or S. Ask the user to type the name and contact For Employee, ask the user to type the employee's monthly salary and the department where he/she belongs to (Ex. Registrar). Then, display name, contact number, salary, and For Faculty, ask the user to press Y if…arrow_forwardCSC 1302: PRINCIPLES OF COMPUTER SCIENCE II Lab 6 How to Submit Please submit your answers to the lab instructor once you have completed. Failure to submit will result in a ZERO FOR THIS LAB. NO EXCEPTIONS. The class diagram with four classes Student, Graduate, Undergraduate, and Exchange is given. Write the classes as described in the class diagram. The fields and methods for each class is given below. Student Exchange Graduate Undergraduate Student: Fields: major (String) gpa (double) creditHours (int) Methods: getGpa: returns gpa getYear: returns “freshman”, “sophomore”, “junior” or “senior” as determined by earned credit hours: Freshman: Less than 32 credit hours Sophomore: At least 32 credit hours but less than 64 credit hours Junior: At least credit hours 64 but less than 96 credit hours Senior: At least 96 credit hours Graduate:…arrow_forward
- JAVA CODE Class Description: Your need to create an instantiable class that represents a parcel of raw land that can be sold by a real estate company. This class should be named Land. It will contain three fields: a string named location and a width and length, measured in feet, each of which can accept numbers with decimal points. You may assume that every parcel of land is rectangular and that 'width' describes the size of the property along the road and 'length' is how far back it goes from the road. The class needs one constructor that sets the values all the fields. The class needs the following public methods: • Getters and setters for all fields. • A method called getArea that calculates and returns the area of the parcel of land in square feet. (Area is calculated as length x width.) • Standard methods: toString, equals, and hashCode where equals and hashCode define two equivalent parcels of land as each having the same length and each having the same width. • Implementation…arrow_forwardClasses: Write a Person class that has these attributes: person_ID, first and last names, and age Default and overloaded constructors Accessors and mutators equals method toString method (make this virtual if C++, don't forget to prep the class for polymorphism) Inheritance: Create a child class to Person called Student: Attributes: GPA and status (freshman, sophomore, junior, senior, graduate, graduated). Make sure you have appropriate accessor/mutator methods Create another child class to represent Faculty. This class will have faculty rank and length of service as attributes along with an office location. Again, add methods as needed. Application Create an application that displays a menu that allows users to add students or faculty, or print either one or exit. Deliverable: Submit your source code and classes on Github (you will be supplied an account) You will also submit a Word document and your code on Canvas. In the document you iwll write a summary of your design…arrow_forwardComputer programmingarrow_forward
- What are the three things you need to do when working with classes that include pointer variables as member variables?arrow_forwardWhat are the three things that you are required to perform for classes that include member variables that are pointers?arrow_forwardPLZ help wiith the following: IN JAVA If an inner class contains non static members, then the class name must be modified by the keyword: Final Static Void Protectedarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





