Question: Question No. 1 Write a Java program for a student class as per the UML diagram given below. Student Class Student_id: int Instance Variables First_name:

 Question No. 1 Write a Java program for a student class

Question No. 1 Write a Java program for a student class as per the UML diagram given below. Student Class Student_id: int Instance Variables First_name: String Last_name: String CGPA: double +Student (Student_id: int. First_name: String Constructor Last_name: String. CGPA: double) +getIDO): int +getFirstName(): String +getLastName(): String +getName(): String +getCGPA(): double +getName() should return complete name i.e. firstName LastName Specifications Declare a student class with the instance variables defined above. (Marks 2) Declare all the methods mentioned above inside Student class. (Marks 4) Create another class with main method. Create two student objects inside main class. The first student should be created with your data (id, name etc.) and the second student should be any friend of yours. Execute all the methods given above and show the id, first name, last name, full name and CGPA of both students using print statements. (Marks 4)

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!