Question: class Student { private String name; private String ID; Private int marks; Student( ) { } Student (String name, String ID) { this.name = name;

 class Student \{ private String name; private String ID; Private int

class Student \{ private String name; private String ID; Private int marks; Student( ) \{ \} Student (String name, String ID) \{ this.name = name; this.ID = ID; \} Public void setMarks (int marks) \{ this.marks = marks; \} Public void display () \{ System.out.println("Student name: "+ name); System.out.println("Student ID: "+ ID); System.out.println("'Student marks: "+ marks); \} Define class Student as given above and use it to complete the following parts: - Create array with size 2 and add two objects of Student using parameterized constructor (constructor with argument).. - Set the objects marks using defined setMarks method. - Print out the objects using defined display method

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!