Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new project in BlueJ. Create two new classes in the project, with the following specifications: Class name: Part Fields : id (int) description

Create a new project in BlueJ. Create two new classes in the project, with the following specifications:

Class name: Part

Fields:

  • id (int)
  • description (String)
  • price (double)
  • onSale (boolean)

1 Constructor: takes parameters partId, partDescrip, and partPrice to initialize fields id, description, and price; sets onSale field to false.

Methods: Write get-methods (getters) for all four fields. The getters should be named getId, getDescription, getPrice, and isOnSale.

Class name: Runner

Fields:

  • bibId (int)
  • event (String)
  • age (int)

1 Constructor: takes parameters runnerBibId, raceEvent, and runnerRaceDayAge as parameters to initialize fields

Methods: Write get-methods (getters) for all three fields. The getters should be named getBibId, getEvent, and getAge.

Save the project as a jar file to submit.

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

3 The distinction between microeconomics and macroeconomics.

Answered: 1 week ago

Question

2 The role of economic theory in economics.

Answered: 1 week ago