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

  Show how the value ascii miriam is stored in memory

Show how the value ASCII "MIRIAM" is stored in memory in Big Endian format starting at location 100 hexadecimal. Assume that each memory location stored two ASCII characters.

  Discussion is the bill of rights

The focus of this discussion is the Bill of Rights. When you have explored the concepts related to the Bill of Rights, you will understand that it is one of the pillars of the American Legal System.

  Discuss what prompted lamport''s mutual exclusion algorithm

Mutual exclusion can be achieved using the following simple method in a distributed system (called the "centralized" mutual exclusion algorithm):

  Explaining the threats of social engineering

Imagine that you are explaining the threats of Social Engineering to the Corporate Entity to a nontechnical audience.

  Do environmental chemicals cause congenital abnormalities

Perform the mechanics of the test. What is the P-value?

  Determine the mass flow of the superheated steam

The outlet stream consists of saturated liquid water at 200 kPa. Assume that there is no heat loss to the surroundings and determine the mass flow of the superheated steam.

  Find the maximum number of gallons possible

Let a be the number of gallons of color A and let b be the number of gallons of color B. Write the inequalities that describe this situation.

  Database concepts

What is a DBMS driver, and what purpose does it serve? Are there different types/varieties?

  Display some additional statistics about reward distribution

In El Farol Extension 2, we display the Min./Max./Avg. Rewards, but these statistics are mainly used for a normal distribution. What should you display if you expected the rewards were not normally distributed?

  Partitioning leads to a linear-time algorithm

a. Show that with a recursive call to S3S5S6, we have enough information to sort the other four groups S0,S1, S2, and S4. b. Show that this partitioning leads to a linear-time algorithm.

  Eliminating this funding source and the specific methods

Students need to research a minimum of 3 sources (of which only 2 may be cited from the internet) about a financial source of funding for Al Qaeda.

  What are different sources of secondary data information?

What are different sources of secondary data information?

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