Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9205908

Have any Question?


Related Questions in Computer Engineering

Question show me how write a program that prompts the user

Question Show me how Write a program that prompts the user for a student grade average (e.g. 86.7) and outputs what the letter grade should be. Ensure that your program notifies the user if he/she enters a non-valid aver ...

Assignmentsuppose that a particular algorithm has time

Assignment Suppose that a particular algorithm has time complexity T(n) - 3 times 2 n , and that executing an implementation of it on a particular machine takes t seconds for n inputs. Now suppose that we are presented w ...

You are the senior consultant at abacus consulting tasked

You are the Senior Consultant at Abacus Consulting, tasked with the database project for Amadeus Real Estate client. The company employs real estate agents who work with customers to buy and sell properties (both residen ...

Explain why some organizations may not place enough

Explain why some organizations may not place enough importance on disaster recovery. What might happen to these organizations in the event of an actual disaster?

Question 1 where to be careful when using cloud services2

Question: 1. Where to be careful when using cloud services? 2. What are those cloud essential characteristics in "The U.S. NIST Definition of Cloud Computing"? The response must be typed, single spaced, must be in times ...

Let a and b be events the symmetric difference atriangleb

Let A and B be events. The symmetric difference A(triangle)B is defined to be the set of all elements that are in A or B but not both. In logic and engineering, this even is also called the XOR (exclusive or) of A and B. ...

What are the key nonprice factors that influence demand and

What are the key nonprice factors that influence demand and supply?

Sorting algorithms are one kind of algorithm whose

Sorting algorithms are one kind of algorithm whose performance may depend upon the data. Choose one of the sorting algorithms or any other algorithm and explain whether the there are any differences in the best, average ...

A small library keeps a roster of who will be at the desk

A small library keeps a roster of who will be at the desk each day. They have a database table as shown below. Week Start___Mon___Tue____Wed_____Thur____Fri 17/10/2011 -- Jane -- Sue -- George -- Sue -- Jane 24/10/2011 - ...

Margaret moore wants to invest in four-year bonds that are

Margaret Moore wants to invest in four-year bonds that are currently priced at $863.49. These bonds have a coupon rate of 5.1 percent and make semiannual coupon payments. What is the current market yield on this bond? (R ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As