logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

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

expert
Ritesh NagarLaw
(5/5)

732 Answers

Hire Me
expert
SrilekhaStatistics
(/5)

764 Answers

Hire Me
expert
Milton BlahaEconomics
(5/5)

568 Answers

Hire Me
expert
Ashraf AliComputer science
(5/5)

988 Answers

Hire Me
Java Programming

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.

 

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. 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

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme