logo Use CA10RAM to get 10%* Discount.
Order Nowlogo

Create a java class about a 3D geometrical figure of your choice.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Objects and Classes Homework

Instructions:

Points will be deducted for each instruction that’s not followed.

 

  • Please submit one source file for each class. 
  • You must create methods other than main in each of your classes. 
  • Documentation is mandatory. Both java doc for the class as well as each method and line comments.
  • Test cases in a Word Doc to show input and output values
  • Classes, Methods and Variables must be named appropriately. Please do not name your classes as Question1 etc.  
  • Please use your own logic to write these classes. Obtaining the solutions from the internet will not help you learn the language. 
  • Please make sure the file names and class names match
  • Late submissions will not be graded unless discussed with me before the due date about a mutually agreed upon resolution. 

 

 

Due Date: July 22, 2019 @ 9 am

 

Each question is worth 15 points. You must answer both questions.

 

  1. Please choose ONE of the following to create a class diagram, a Java class and a Demo class that instantiates the class.
  1. Country
  2. Clothes
  3. ComputerParts
  4. CarParts
  5. Food
  6. Film
  7. Furniture
  8. Books 

 

For example if I choose to create a class for Television, I will have a class diagram (using UML) for the Television class.

I will then use the information in the class diagram to create a Java class called Television and include the fields and methods laid out in the class diagram. 

I will also include a constructor where I display a statement about the object being created and set an initial value in one of the fields using the mutator methods.

 

We discussed this in class today and you can also refer to Chapter 6 in your text book.

Next I will create a TelevisionDemo class where I will create objects based on the Television class. 



For your choice in the list above (a to h), you must include the relevant fields that the class needs, and the accessor and mutator methods. You must also include one other method that displays the information contained in the fields in a formatted output. And don’t forget Constructors! You may create one or more constructors. But you must have at least one constructor.

 

In the Demo class you will create an object and set the appropriate values using the available mutator methods.  You will then use the method to display the objects contents using the display method you created.

 

Naming convention that you can follow:

If the Class name is Books

Then your demo class is called BooksDemo.

 

Your file submissions must be the class diagram (preferably in a word doc), 2 java source files and a test document.



  1. Create a java class about a 3D geometrical figure of your choice. You must create a UML class diagram showing the fields and methods (including the constructor).

Also include methods that calculate the volume and surface area of the 3D figure you have chosen.

 

Naming convention that you can follow:

If the Class name is Dodecahedron

Then your demo class is called DodecahedronDemo.

 

Your Demo class must create more than one object and assign appropriate values which will make the object unique. You must also display the surface area and volume of the object you created. Examples of fields are measurements, color, texture etc. You can get creative about the fields that may want to include.

 

    Your file submissions are 2 java source files and a test document.

 

Expert's Answer

855 Times Downloaded

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

855 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

761 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

565 Answers

Hire Me
expert
Husnain SaeedComputer science

993 Answers

Hire Me
expert
Atharva PatilComputer science

662 Answers

Hire Me