Create an inventoryitem class that contains fields

Assignment Help Basic Computer Science
Reference no: EM131395900

Complete the following tasks:

a. Create an InventoryItem class that contains fields for a product number, quantity in stock, and price each. Include a default constructor that initializes all fields to 0. Include any other functions that you need to process records in the programs described in the following steps.

b. Write a program that creates an empty file of 100 InventoryItem objects that later can be used to store records for random access. Save the file as InventorySystemCreate.cpp.

c. Write a program that allows the user to enter data for as many InventoryItems as he or she wants. All InventoryItem product numbers should be between 1 and 99. If the user attempts to enter a product number greater than 99, force the user to reenter the number. Store each record at a disk location for which the value equals the product number times the size of an InventoryItem object. Save the file as InventorySystemDataEntry.cpp.

d. Write a program that allows a user to enter an InventoryItem product number and display the quantity and price as stored in the file created in part c. Allow the user to enter and get output for as many items as he or she wants. If a requested item does not exist, issue an appropriate message. Save the file as InventorySystemRequestItem.cpp.

Reference no: EM131395900

Questions Cloud

Third-degree price discrimination : 1. Go to the Arkansas State University basketball tickets page http://www.astateredwolves.com/ViewArticle.dbml?& Identify an example of third-degree price discrimination.
Who are the potential partners in my community : Based upon the key findings, gaps, and recommendations obtained from the family assessment and the community assessment perform an evaluation of an actual or hypothetical public health intervention. The intervention MUST address one of the Healthy..
By what year will china gdp double : By what year will China's GDP double? Its population? Its per capita GDP? In what year will China's GDP equal US GDP? In what year will China's GDP per capita equal US GDP per capita?
What is the equilibrium quantity : What is the equilibrium quantity? What is the equilibrium price?
Create an inventoryitem class that contains fields : Create an InventoryItem class that contains fields for a product number, quantity in stock, and price each. Include a default constructor that initializes all fields to 0. Include any other functions that you need to process records in the program..
Perceptions of the leaders performance : Some people say it dilutes a leader's authority if subordinates are allowed to give feedback to the leader concerning their perceptions of the leader's performance. Do you agree? Why or Why not?
Calculate the present value of a sum of money : Ruth wants to calculate the present value of a sum of money that she will receive after the demise of her grandparents. To calculate the present value, she should use the:
Fixed ratio of three boxes of strawberries : Walt consumes strawberries and cream but only in the fixed ratio of three boxes of strawberries to two cartons of cream. At any other ratio, the excess goods are totally useless to him. The cost of a box of strawberries is $10 and the cost of a ca..
Do you feel you missed out on anything because of gender : How has your sex (female) and the our society's gender roles (femininity) for your sex affected your life to this point?Do you feel you missed out on anything because of gender?What would you change about our society's gendered expectations for women..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Minimum requirement of random access memory

What should be minimum requirement of random access memory (RAM) for internet access?

  Considered a nested repetition structure

Describe a procedure you use in everyday life in which you repeat a series of steps over and over again until some condition is met. Can you describe one that would be considered a nested repetition structure?

  Use java 5 to create a generic class drawingbox with a type

Use Java 5 to create a generic class DrawingBox with a type parameter that simulates drawing an item at random out of a box. This class could be used for simulating a random drawing.

  What tasks will the project accomplish

Vision or preliminary scope of the project-What tasks will the project accomplish?

  Nonemployees having physical access

What are the dangers of nonemployees having physical access? Give examples.

  Article relevant to current social engineering threats

Select an article relevant to current social engineering threats.

  Need a complete depth project details on present

Need a complete depth project details on present  hyper local players in bangalore. where can i get it pls suggest some websites or link, ineed it badly

  How would you fix the false sharing issue that can occur

Consider the following portions of two different programs running at the same time on four processors in a symmetric multicore processor (SMP). Assume that before this code is run, both x and y are 0.

  Various uses for network devices like routers

Consider the various uses for network devices like routers, switches, hubs, repeaters, etc. and how one or more of them would aid situations where network performance is degraded.

  Why is it so important in information security

Why is there a dispute between digital nonrepudiation and legal nonrepudiation?

  Which of the following are not valid java identifiers

Which of the following are not valid Java identifiers? Why?

  Retrieve information for the user

Build a script so it takes the supplied first name of a user and returns the indicated output. The script should retrieve information for the user the script is run against and an error message if no user is found. Users to test will be Jake, Jim,..

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