Java Encapsulation
Write a class encapsulating the concept of a Student, assuming that a student has the following attributes: last name, first name, id, array of 4 grades. Include a constructor, the accessors and mutators, and method toString. Also code the following methods: one returning the GPA using the array of grades (assuming each grade represents a course grade and all courses have the same number of credit hours) and a method to add a course grade to the array of grades (this means creating a larger array). Write a client class to test all your methods.
Get Project Solution Now
Comments
Post a Comment