Question: Programmer defined objects Modify the studentRecord object as indicated below. h. Change the name property to fname and assign a first name of your choosing

 Programmer defined objects Modify the studentRecord object as indicated below. h.

Change the name property to fname and assign a first name of

Programmer defined objects Modify the studentRecord object as indicated below. h. Change the name property to fname and assign a first name of your choosing 2. Add an Iname property and assign a last name of your choosing 3. Set the major property to a major of your choosing 4. Add a gpa property and set it to zero 5. Modify the displayStudentRecord method to print all of the studentRecord properties in the following order: fname, Iname, major, gpa 6. Add an else clause to the if statement in the setMajor method that displays an error message if a new major value was not passed in. 7. Add a setGPA method that has one parameter called newGPA. Set the student gpa property equal to the newGPA parameter. Make sure to verify that a new gpa value was passed in. If a new gpa value was not passed in display an error message. The setGPA method is similar to the setMajor method

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!