Question: Assignment 1 Write a program to represent the following class diagram: table [ [ Student ] , [ - studentID: int ] , [
Assignment
Write a program to represent the following class diagram:
tableStudent studentID: int name: String subject: String mark: doubledisplay:voidcarve:void
Using parameterizedconstructor and this keyword for all instance variables.
display method: is used to display the information of student who has studentID
carve method is used to carve marks for student who has mark 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 students as mentioned bellow:
ali,
sami,
sara,
lina,
Call the display method and carve method for the objects that are created previously in the main method.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
