Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me ! (in java programming language ) Your grade point average (GPA) is calculated by dividing the total amount of grade points earned

please help me !

(in java programming language )

Your grade point average (GPA) is calculated by dividing the total amount of grade points earned by the total amount of credit hours attempted. Your grade point average may range from 0.0 to 4.0.

Create the calculator using custom generic LinkedList using the given class List as following:

A) Write a class Course that has these private fields: Integer id Integer credits Double grade_points and : Constructor Setters and getters method. toString() method The grade_points must be in range [0..4]. If not, the constructor must throw the exception GpointRangeException to the caller. The test class (the caller) must handle this problem in any suitable way.

B) Write a class GPATest , create a List then add at least five courses.

C) Update class List to add the following methods:

i. public int totalCredits(): return sum of credits for all courses.

ii. public double totalGradePoints(): return sum of (credits * grade points) for all courses.

iii. public void insertUnique(T insertItem): thats insert an item if it is not already exist, otherwise throw the exception CourseExistsException to the caller.

D) Back to class GPATest , calculate and print GPA = Total Grade Points / Total Credit

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

Beyond Greed And Fear Understanding Behavioral Finance And The Psychology Of Investing

Authors: Hersh Shefrin

1st Edition

0195161211, 978-0195161212

Students also viewed these Databases questions