Make the get/set methods for each of your variables

Assignment Help Computer Engineering
Reference no: EM1330538

Choose a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD movies, or software).

Create a product class that holds the item number, the name of the product, the number of units in stock, and the price of each unit.

Create a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit). Pay attention to the good programming practices in the text to ensure your source code is readable and well documented.

I forgot some important information and I have a response for this, but I could not edit it since an OTA had already signed it out. I tried to delete the original submission, but it would not let me.

I chose cd's as the the product.

Here is the information:

For this assignment you will be creating a new program that meets the following criterion:

1. The Inventory Program application should contain a class named 'Product' that holds the item number, the name of the product, the number of units in stock, and the price of each unit. This class will be saved in a separate file named Product.java (Hint: this means you should also call your class "Product".)

2. The constructor for this class will have 4 arguments: the item number, the name of the product, the number of units in stock, and the price of each unit.

3. In the main method you will create 3 new objects of the class 'Product' (one at a time) each with different values and pass those values to the constructor. (You will not ask the user for this data and you will not use a loop nor will you use an array.)

4. You will also create a calculate inventory method that will calculate the value of each item by multiplying the number of units in stock by the price of each unit.

Don't forget to create the get/set methods for each of your variables.

5. You will also need to display the inventory value. You will display the inventory from the "main method" (this means that your 'print' statements will be in the "main method"). Be sure that you use the appropriate format specifiers to display unit price and the value of the inventory for the item as currency. Each item's inventory information should be displayed on only 1 line. Appropriate column headings should also be used.

6. You will be submitting two files for this assignment. The file that contains the main method should have a class declaration for InventoryPart1 and the file name should be InventoryPart1.java. The class file should be named Product.java which means that your class will also be named Product.

Reference no: EM1330538

Questions Cloud

Subsiquent table provides how the number of security guard : The subsiquent table provides how the number of security guards affects the number of guards affects the number of radios stolen per week.
Explain how does the travel website handle security : How does the travel website Expedia.com handle security, confidentiality, and International issues?
Explain the hr management case scenario : HR Management Case Scenario: Fair Labor Standards Act - Research and check the salient features of the Fair Labor Standards Act (FLSA)
National production affect pollution : Does Increased National Production Affect Pollution?
Make the get/set methods for each of your variables : select a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD movies, or software).
Fair debt collection practice act : How does the Fair Debt Collection Practices Act benefit consumers? Why was the Federal Food, Drug, and Cosmetic Act passed?
Annual after-tax required lease income : Leases R Us, Inc. (LRU) has been contracted by Robotics of Beverly Hills (RBH) to provide lease financing for a machine that would assist in automating a large part of their current assembly line. Compute the amount to be amortized? Compute the ann..
It is given an offer to split if you accept this offer you : It is given an offer to split, if you accept this offer you keep the $1, and the other player keeps $19.
Most of us desire to live in an environment : Most of us desire to live in an environment that is violence free. When we watch Court TV and see a murderer or rapist, it is just human for us to wish that he/she can get the maximum punishment via the law.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Similarities and differences to issue of regulation

Describe the relevance of each of these similarities and differences in order to issue of regulation of the Internet.

  How can we use foreign key constraints

How can we use Foreign Key constraints. How may we create new View on one or more tables ?

  Creating flowchart and pseudocode utilizing control breaks

Generate a Flowchart and Pseudocode utilizing the Control Breaks for Xhemrock is a brake pad manufacturing company. This company utilizing the raw materials like carbon powder, ash, iron, and resin.

  Registers and risc processor

A RISC processor has 152 total registers, along with the 12 designated as global registers.

  Illustrate precedence graph

Illustrate precedence graph

  Evolution of software and hospital improvements

Discuss how the hospitals are improving the efforts along with their supply chain through the evolution of software.

  Determine what particular piece of hardware

Specifically solution provides the learner an understanding of what steps to take to troubleshoot hardware issues. While directed specifically towards troubleshoot the workstation connectivity problem, the solution is applicable to troubleshooting..

  Problems on microcomputer applications for management

problems on Microcomputer Applications for Management.

  Make short story consisting of several of these sentences

Write down an application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition.

  What is the goal to exercises in the bluej textbook

What is the goal to exercises in the BlueJ textbook? For the remains of the course, you will answer the questions posed by BlueJ textbook-you will not require downloading an additional worksheet and filling it in as you did for first four units.

  Define how each type compromises a system

define how each type compromises a system. How can these different types of malware be stopped.

  Determining the closure under operation

Explain whether the following sets closed under following operations? Justify your answer. If a set is not closed under operation, what is its closure under the operation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd