Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

te a Java program for a student class as per the UML diagram given below. Student Class Student_id: int First_name: String Last_name: String CGPA: double

te a Java program for a student class as per the UML diagram given below.

Student

Class

Student_id: int

First_name: String

Last_name: String

CGPA: double

Instance Variables

+Student (Student_id: int, First_name: String, Last_name: String, CGPA: double)

+getID(): int

+getFirstName(): String

+getLastName(): String

+getName(): String

+getCGPA(): double

Constructor

+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)

  • EARLIER I GET THE SOLUTION FROM CHEGG BUT IT IS SHOWING ERROR ON MAIN CLASS THAT SOME INTERFACE ORENUM CLASS IS NEEDE PLEASE BE CLEAR WITH THAT PROBLEM

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago