Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Student Class: In a system like The Source, student information is stored in a d

ID: 3552372 • Letter: S

Question

Student Class:

In a system like The Source, student information is stored in a database. Every time student information is requested, an object is most likely built from the database information.

Download StudentGrades.java and write Student.java from it. You may want to comment out certain parts of StudentGrades.java in order to test one piece of your class at a time. Note that grades are stored in an array initialized in the constructor, pay close attention how to size the Array, see slide 6 in the Arrays of Objects & Null presentation (hint, hint).

It should never be possible for a student to have a negative score. In order to enforce this, you need to make sure no one can break encapsulation (Object Encapsulation) and change a field directly

Explanation / Answer

.

1) Car Class:

Implement a class Car with the following properties (fields) and behavior (methods):

fuel efficiency (measured in miles/gallon or liters/km