Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The class diagram with four classes Student, Math, Computer Science and Bioinformatics is given. The Write down the classes as described in the class diagram.

The class diagram with four classes Student, Math, Computer Science and Bioinformatics is given. The Write down the classes as described in the class diagram. The fields and methods for each class is given below.

Student:

Fields: major (String)

gpa (double)

creditHours (int)

Methods:

getGpa: returns gpa

getYear: returns freshman, sophomore, junior or senior as determined by earned credit hours:

Freshman: Less than 32 credit hours

Sophomore: At least 32 credit hours but less than 64 credit hours

Junior: At least credit hours SH but less than 96 credit hours

Senior: At least 96 credit hours

Graduate:

Fields: degree (String) (masters or phd)

concentration (String)

years (int) (stores no. of years spent in grad school)

Methods: getYear: returns years

getConcentration: returns concentration

Undergraduate:

Fields: honors (Boolean)

Methods: isHonors: returns honors

Exchange:

Fields: country (String)

year(string) (start date of the exchange program, stores Fall, Spring or Summer followed by the year eg: Fall 2017)

Methods:

getYear: returns year

getCountry: returns country

Write another client class.

Create an object of class Undergraduate called Alex whose major is CS, gpa is 3.9, credit hours = 54 and honors = true.

Create an object of class Graduate called Mary whose degree is Masters, years = 1, gpa is 4.10, major =computer science and concentration is Cybersecurity.

Print out the Alexs major, gpa, year and use isHonors method to see if the student is an honors student.

Print out the Marys concentration, years spent in grad school and major.

Create an object of class Exchange for an exchange student for Summer 2017 from Brazil and print out his gpa, major and country.

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago