Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part I: Design a class named Student. The class contains: . Private data fields, including first name, last name and GPA . Getter and setter

Part I: Design a class named Student. The class contains:

. Private data fields, including first name, last name and GPA

. Getter and setter methods for all data fields

. A method named toString that returns student information in the following format:

first name last name GPA .

A non-parameter constructor (assign initial values of your choice) .

A constructor that creates a student with name and GPA.

Part II: Tester-Write a tester program named Tester1.java to perform the following tasks:

. create three students

. calculate average GPA for the three students

. display three students records

. display the average GPA ( a separate line)

Part III: revise the driver class (a separate file named Tester2.java) as follows:

. Read a data file and construct students from the data file

. Print students (name and GPA) .

The file student.txt will contain several students information as follows:

Smith Davis 3.6

Johnson Kanet 3.0

Williams Carl 3.8

Jones Brown 3.3

Steve Davis 3.0 .

Smaple program output

---------------------------------

Student Name | GPA

--------------------- | --------

Smith Davis | 3.6

Johnson Kanet | 3.0

Williams Carl | 3.8

Jones Brown | 3.3

Steve Davis | 3.0

------------------------------

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

Step: 3

blur-text-image

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

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

4. Explain the characteristics of successful mentoring programs.

Answered: 1 week ago