Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

How were the risks in ABS CDOs misjudged by the market?

Answered: 1 week ago