Question: L 1 3 Homework: Gym Equipment Problem Description Hello! Please make sure to read all parts of this document carefully. In this assignment, you will

L13 Homework: Gym Equipment
Problem Description
Hello! Please make sure to read all parts of this document carefully.
In this assignment, you will be applying your knowledge of interfaces and Comparable to write
one interface and some classes that can be used to simulate the management of equipment in
a gym.
Solution Description
You will write one interface, Adjustable, and five classes: FreeWeight, Barbell, Dumbbell,
WeightMachine, and Gym. Each will be written in its own file (named accordingly).
You must use constructor chaining when it's applicable:
If a class has N constructors, it will use "this" constructor chaining N-1 times
A class will use "super" constructor chaining at most once. It may only be used in
the constructor that has all the appropriate parameters. You will use it if and
only if, in that constructor, the implicit "super" constructor chaining is not
appropriate
Visibility for required elements:
All classes, methods, and constructors must be public
All variables must be private
You may add to aid you (if you want)
Methods, if they are private
Variables, if they are private static final
You may not add any other classes or constructors
You will also be provided with an additional class, FreeWeightConcrete (in an appropriately
named file). This class is used for autograding purposes, as we need a way to test the class that
we cannot directly instantiate. You need to familiarize yourself with this class, as it will help
you understand autograder error messages related to the type which it is replacing. This file is
error-free, and error messages related to it are actually errors about the related type. You
must not change it in any way, and you must submit it along with your other files in your
submission.
Adjustable
It represents objects that can be, in some way, adjusted in their weight. This is an interface. It
will have:
boolean adjustWeight (int) abstract method. The parameter is the desired
adjustment, and the return value is to indicate whether it could be applied successfully.
 L13 Homework: Gym Equipment Problem Description Hello! Please make sure to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!