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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

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

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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