Question: Task 1.1 Create a class to model a student. This class should be named Student. A Student has the following attributes: first name. surname. student

 Task 1.1 Create a class to model a student. This class

Task 1.1 Create a class to model a student. This class should be named Student. A Student has the following attributes: first name. surname. student number. For now, use an empty constructor for Student objects Your Student class should support the following operations: Get first name - returns the first name of a Student. Get surname returns the surname of a Student. 1 Get student number - returns the student number of a Student. Set first name - sets the first name of a Student. Set surname - sets the surname of a Student. Set student number - sets the student number of a Student Get full name return the concatenation of the first name and the surname of a Student. To string - returns a string indicating the various data associated with the Student. An example returned String might look like Name : Troy Astarte. StdNo: 101095 Create a Test class which is used to test the implementation of the Student class. The Test class will have a main method. In the main method, you should create a Student or two and call the various methods to demonstrate the implementation of the Student class works correctly. Note: we never instantiate the Test class - it is simply the "driver for the program. This class constructs and manipulates Student objects. Likewise we never run the Student class. Note also: Eclipse may require you to add an @Override comment before your To String method. This is fine. Task 1.2 Your task is to implement a constructor method for the Student class. The constructor will take first name, surname, and student number as arguments. O Task 1.3 Extend your Student class to additionally store a coursework mark and an exam mark (out of 100). Add a method named averageMark which will compute and return an average mark for the student. Assume coursework and exam are weighted equallythe average should be the sum of the two marks divided by 2. Watch out for integer division: the method should return a double because it is possible this calculation will not result in an integer. Test your implementation by calling these methods from your Main method in the Test class. Task 1.4 In your main method create an array that holds three different Student objects

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!