Please finish the following JAVA Codes: 1. The class Person includes information of a person’s first name,...

60.1K

Verified Solution

Question

Programming

Please finish the following JAVA Codes:

1. The class Person includes information of a person’s firstname, last name, phone number, and email. Implement the class withappropriate constructors, getters and setters.

2. Derive a Student class that extends Person. In addition to aperson’s information, a student has major, year, GPA, and a list ofenrolled courses. In addition to appropriate constructors, gettersand setters, make two methods addCourse and dropCourse.

3. Design and implement a program, either in main() or inanother class, that calculates the GPA of a student. The student’scourses should be displayed in console, one at a time, and thegrade of the course will be input to console by user. After allgrades were input, the GPA should be displayed and be recorded inthe student object.

Answer & Explanation Solved by verified expert
4.1 Ratings (483 Votes)
hey i am done with the code here is the code i had face a problem with major variable i dont know what therole of the major variable so i not include major variable inany calculation in the GPA you can change it on your own here is the final code Personjavapackage studentgpa author Aditya kumarpublic class Person String firstname lastname emaillong mobileno public PersonString firstname String lastname String emaillong mobileno thisfirstname firstnamethislastname lastnamethisemail emailthismobileno mobilenopublic Person setters and getterspublic String getFirstname return firstnamepublic void    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students