java shape
CMSC335 Project 1
Overview
In the project you will use Java Inheritance to create a series of related classes with a “Shape” theme.
Before completing this exercise, be sure to review and try the Java class and inheritance examples and
materials found in this free Safari resource:
https://learning.oreilly.com/library/view/java-the-complete/9781260440249/
You should focus on Chapters 6, 7 and 8.
If you have previously signed up for the Safari account you don’t need to sign-up again. Just use this link:
https://learning.oreilly.com/accounts/login/?next=/library/view/temporary-access/
If you have not previously requested a Safari account follow the details on this page to sign-up for your
Safari Account:
https://libguides.umuc.edu/safari
You’ll need to sign in using your UMGC student email account. Once you sign in, you’ll have immediate
access to the content, and you’ll shortly receive an e-mail from Safari prompting you to set up a
password and complete your account creation (recommended).
Students: Your UMUC e-mail account is your username + @student.umuc.edu (example:
hsolo2@student.umuc.edu).
Note: Be sure to review is-a and has-a class relationships prior to starting this exercise as well.
Assignment Details
Design, implement and test a Java class Inheritance hierarchy that would satisfy the following is-a and
has-a relationships:
A Shape is an object
A TwoDimensionalShape is a Shape
A ThreeDimensionalShape is a Shape
A Circle is a TwoDimensionalShape
A Square is a TwoDimensionalShape
A Triangle is a TwoDimensionalShape
A Rectangle is a TwoDimensionalShape
A Sphere is a ThreeDimensionalShape
A Cube is a ThreeDimensionalShape
A Cone is a ThreeDimensionalShape
A Cylinder is a ThreeDimensionalShape
A Torus is a ThreeDimensionalShape
A Shape has a NumberofDimensions
https://learning.oreilly.com/accounts/login/?next=/library/view/temporary-access/
https://libguides.umuc.edu/safari
mailto:hsolo2@student.umuc.edu)
A TwoDimensionalShape has an area
A ThreeDimensionalShape has a volume
Note you should fill in additional methods and variables that make sense for each of the classes. Also
some assumptions about shape types is appropriate and should be documented in the code and
documents submitted. For example, type of triangle …
Create a command line driven menu that allows a user to construct each of the TwoDimensional and
ThreeDimensional Shape subclasses. The menu should continue to loop prompting for a specific class
and then prompt for appropriate input parameters. The values returned should be the volume or area
as appropriate to the shape. Error checks should be in developed to make sure appropriate menu items
and types of data were input and prompt the user to enter to correct data. An option to exit the
program should be available as well that will provide an appropriate Thank you message along with the
current date and time.
The following represents a possible menu session for a user:
*********Welcome to the Java OO Shapes Program **********
Select from the menu below:
1. Construct a Circle
2. Construct a Rectangle
3. Construct a Square
4. Construct a Triangle
5. Construct a Sphere
6. Construct a Cube
7. Construct a Cone
8. Construct a Cylinder
9. Construct a Torus
10. Exit the program
2
You have selected a Rectangle
What is the length?
4
What is the Width?
9.5
The area of the Rectangle is 38.
Would you like to continue? (Y or N)
3
Sorry I do not understand. Enter Y or N
Y
Select from the menu below:
1. Construct a Circle
2. Construct a Rectangle
3. Construct a Square
4. Construct a Triangle
5. Construct a Sphere
6. Construct a Cube
7. Construct a Cone
8. Construct a Cylinder
9. Construct a Torus
10. Exit the program
10
Thanks for using the program. Today is Nov 11 at 1:40 PM.
Submission Requirements:
1. Submit all of your Java source files (each class should be in a separate .java file). These files
should be zipped and submitted with the documentation.
2. UML class diagram showing the type of the class relationships.
3. Developer’s guide describing how to compile and execute the program. The guide should
include a comprehensive test plan that includes evidence of testing each component of the
menu with screen captures and descriptions supporting each test. Documentation includes
Lessons learned.
Your compressed zip file should be submitted to the Project 1 folder in LEO no later than the due
date listed in the classroom calendar.
Grading Rubric:
Attribute Meets
Design 20 points
Designs a Java class Inheritance hierarchy that would satisfy the following is-
a and has-a relationships:
A Shape is an object
A TwoDimensionalShape is a Shape
A ThreeDimensionalShape is a Shape
A Circle is a TwoDimensionalShape
A Square is a TwoDimensionalShape
A Triangle is a TwoDimensionalShape
A Rectangle is a TwoDimensionalShape
A Sphere is a ThreeDimensionalShape
A Cube is a ThreeDimensionalShape
A Cone is a ThreeDimensionalShape
A Cylinder is a ThreeDimensionalShape
A Torus is a ThreeDimensionalShape
A Shape has a NumberofDimensions
A TwoDimensionalShape has an area
A ThreeDimensionalShape has a volume
Functionality 40 points
Contains no coding errors.
Contains no compile warnings.
Creates a command line driven menu that allows a user to construct each of
the TwoDimensional and ThreeDimensional Shape subclasses.
The menu should continue to loop prompting for a specific class and then
prompt for appropriate input parameters. The values returned should be the
volume or area as appropriate to the shape.
Error checks should be in developed to make sure appropriate menu items
and types of data were input and prompt the user to enter to correct data.
An option to exit the program should be available as well that will provide an
appropriate Thank you message along with the current date and time
Test Data 20 points
Tests the application using multiple and varied test cases.
Documentation and
submission
20 points
Source code files include header comment block, including file name, date,
author, purpose, appropriate comments within the code, appropriate
variable and function names, correct indentation.
Submission includes Java source code files, Data files used to test your
program, Configuration files used.
Documentation includes a UML class diagram showing the type of the class
relationships.
Documentation includes a user’s Guide describing of how to set up and run
your application.
Documentation includes a test plan with sample input and expected results,
test data and results and screen snapshots of some of your test cases.
Documentation includes Lessons learned.
Documentation is in an acceptable format.
Document is well-organized.
The font size should be 12 point.
The page margins should be one inch.
The paragraphs should be double spaced.
All figures, tables, equations, and references should be properly labeled and
formatted using APA style.
The document should contain minimal spelling and grammatical errors.
Any submissions that do not represent work originating from the student will be submitted to the
Dean’s office and evaluated for possible academic integrity violations and sanctions.
We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.
Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.
Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.
Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.
Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.
Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.
We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.
Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.
You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.
Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.
Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.
You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.
You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.
Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.
We create perfect papers according to the guidelines.
We seamlessly edit out errors from your papers.
We thoroughly read your final draft to identify errors.
Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!
Dedication. Quality. Commitment. Punctuality
Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.
We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.
We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.
We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.
We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.