Question: Assignment 1 Write a program to represent the following class diagram: table [ [ Student ] , [ - studentID: int ] , [

Assignment 1
Write a program to represent the following class diagram:
\table[[Student],[- studentID: int],[- name: String],[- subject: String],[- mark: double],[+display():void],[+carve():void]]
Using parameterized-constructor and this keyword for all instance variables.
display() method: is used to display the information of student who has studentID =102.
carve () method is used to carve 2 marks () for student who has mark 5 and display his information, otherwise the mark will stay as it is with displaying the student information.
In the main method, do the following:
Initial values for 4 students as mentioned bellow:
(100,ali,p,6)
(101,sami,p,3)
(102,sara,p,2)
(103,lina,p,7)
Call the display() method and carve() method for the 4 objects that are created previously in the main method.
Assignment 1 Write a program to represent the

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 Programming Questions!