a. Write a class named Student has the following data fields and methods: private int Id private double GPA Constructor to create a Student object with specified name, address, Id and GPA. Accessors...


a. Write a class named
Student
has the following data fields and methods:



  • private int Id

  • private double GPA

  • Constructor to create a Student object with specified name, address,


Id and GPA.



  • Accessors and mutators methods for Id and GPA data fields (get and set).

  • A method toString () that returns Id, name and address and GPA.




b. Write a test program that creates a Student object with Id:123 Name: Ahmed address: Muscat grade: 2.55 & then call toString () method to display Id, name and address and GPA.



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here