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

  Determining the cpi of computer

A workstation utilizes a 15-MHZ processor with a claimed 10-MIPS rating to implement a provided programme mix. Suppose a one-cycle delay for every memory access. What is effective CPI of this computer?

  State diagram for coffee machine controller

Raw behavioural specs utilizing the state diagram for the coffee machine controller explained as follow. State events, State actions.

  How to write a sql insert statement

Write down a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection (use salaries to restrict the data).

  Pros and cons of chen and crow''s feet notations

What are the pros and cons of Chen and Crow's feet notations.

  What is difference between client and a server

What are the differences between client and a server. What is function of each layer in a three-layer application?

  Compare the role and impact of a computing technology

information on understanding an inner workings of digital downloads and digital compression. I need to follow the outline below. I'm running out of information. I need to compare the role and impact of a computing technology on society.

  Computer forensics investigation

As a new computer forensics investigator and as a matter of the forensics policy and procedure, you will require to understand the procedures for processing incident scene for the digital and the logical evidence.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Express the process of customer identification

Then, customer brings the videos to the front desk where an attendant identifies the customer using customer's ID Card, checks the customer's records in the system, and then enters information about rented videos into the system.

  Explain the following statements as logic expressions

Please state the following statements as logic expressions.

  How to write a class named dayofyear that gets an integer

How to write a class named DayOfYear that gets an integer Day 2 would be January 2 Day 32 would be February 1 Day 365 would be December 31

  What happen if you did not break

When using Case statements, what would happen if you did not "Break?" Please give an example and explain. Where, in your everyday life, would you use all of the looping techniques.

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