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

  What transform a network to a secure network

How do I transform a network to the secure network? What tools should I have and what kind of hardware do I need to have a basic secure network.

  What is required to maintain the data current

This question in not concerned with the effort to initially build/develop and populate a database, but at the place of the ongoing/long term effort to keep the data and DBMS current (up to date and accurate).

  Determining the salary of person

Write down a program which determines how much a person earns in a month in case the salary is one penny first day, two pennies second day, four pennies the third day, and so on with the daily pay doubling each day employee works.

  What kinds of equipment used

examine applying a voice and video over IP solution for a company interested in enabling its geographically distributed sales force to collaborate efficiently. what kinds of solutions might you propose and what kinds of equipment.

  Discuss and describe the potential security threats

Discuss and describe the potential security threats

  Implementing the code

Write down a complete program which declares an integer variable, reads a value from the keyboard into that variable. Write down a program which determines the mileage reimbursement for the salesperson at a rate of $.35 per mile.

  Program to count the number of times page is opened

Generate a page in order to count the number of times the page is viewed by the user in a single session. Each time page is refreshed or opened in the browser during the session counts as 1 page view.

  Difference between search language and a search engine

What is the difference between search language and search engine in terms of internet searching, and be specific.

  Arrays and control structures important tools in programming

Arrays and control structures important tools in programming.

  Tools that help in the attack

When initially collecting the information on a network, that reconnaissance tool or method do you believe would generate the best results include what information could you learn utilizing this tool or method and how could this information be used..

  Create an application that generates a quiz

Create an application that generates a quiz

  Advantages and disadvantages of compilers and interpreters

choose a problematic situation that you think a Java program can solve or make easier.

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