Write the updated records out to a new file

Assignment Help Basic Computer Science
Reference no: EM13984640

write a C++ program that processes records of items purchased. Assume the items are being purchased by one person.

Create a class definition for item records with the following fields: id, name, quantity, regular price, price paid, and total for item. Dynamically allocate an array and read records from a file.

You will read all fields except the price paid and total. See below.

Calculate price paid for items. Customers get a 10% discount off regular price of item if they purchase 10 or more of the item.

Calculate the total (quantity times price paid) for each record. Sort the records in the array by the item's name using the generic sort function in the file sort.h.

Write the updated records out to a new file (orderout.txt). Include all field data.

Reference no: EM13984640

Questions Cloud

Use the net present value method to determine your answer : Should the landfill be acquired if Bedford desires an 8% return on its investment? Use the net-present-value method to determine your answer.
How has culture shaped our understanding of psychopathology : How has culture shaped our understanding of psychopathology
Derivation of economical span of a bridge : Derivation of economical span of a bridge
Discuss the importance of westward expansion : Discuss the importance of westward expansion since 1800.What were some of the key land acquisitions, and how was expansion carried out? What was federal policy towards Native Americans and Mexico, and how did it factor into expansion? Finally, what i..
Write the updated records out to a new file : Calculate the total (quantity times price paid) for each record. Sort the records in the array by the item's name using the generic sort function in the file sort.h.
Concepts of self-presentation and impression management : Using 250-500 words, compare the concepts of self-presentation and impression management. Include some personal examples in your paper
Discuss the development of industry and transportation : Discuss the development of industry, transportation, and urban areas in the 19th century. What factor did technology play in this process? How did these developments serve to divide the North and South even further apart? In what ways did these devel..
Reviewing the adventures of an it leader : For this assignment, complete a 3-5 page summary based on your readings in The Adventures of an IT Leader. As you read the chapters, think about pertinent issues and the relationship of these factors to situation outcomes. As you prepare your paper..
What is the npv - irr and probability index : Revenues and operating costs are expected to be constant over the project''S life - Tax rate is 35%. What is the Npv,IRR,and probability index?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Describe how history shaped today''s networks

Describe how history shaped today's networks. Focus on the network technology involved and its evolution through to its current state.

  Calculate the number of integers divisible

Calculate the number of integers divisible by 4 between 50 and 500, inclusive. Hexadecimal digits are formed using either a numeric decimal digit or a letter from A to F. How many possible digits can be chosen? Did you use the sum rule or the produ..

  Write paper on battery backup units

Six pages research paper that must be supported by 3-5 citations in APA format.. Please choose one from this list of propose topics: Battery Backup Units, Small Outline Rambus Module and Ram

  How much laser be tipped before light no longer continues

If a laser is to be pointed into the end of the fibre, but is "tipped" to one side by θ degrees, how much can the laser be "tipped" before the light no longer continues down the fibre?

  Pseudocode develop a flowchart using visual logic

Complete an IPO Model; write pseudocode develop a flowchart using Visual Logic for the following statements: The variable N starts with the value 1000.

  What is a predefined control event

What is a predefined control event? Discuss its usage in programming.

  Case problem- c & m veterinary clinic

Case Problem: C & M Veterinary Clinic, C & M Veterinary Clinic has been treating small and medium-sized animals in the Marlow, Oklahoma, and area for more than 10 years. The staff veterinarians perform all checkups and surgeries, and the staff te..

  Excavated material to the structural fill location

How many dump truck loads, given a dump truck with 18 LCY capacity, will be required for hauling the excavated material to the structural fill location?

  Implementing erp systems

What do vendors seem to know and not know about implementing ERP systems? and How much influence should vendors have in an organization's ERP decision?

  Study ai literature to find-task can be solved by computers

Study the AI literature to find whether or not the following tasks can presently be solved by computers. Give proper reference to support your answer.

  Develop a plan to connect your remote users

Develop a plan to connect your remote users. your solution can involve more than one remote access type.

  List a list of items for sale of a particular customer

Enter a bid for an item and the bids are stored in an STL priority_queue object. This allows the highest bid to be at front of the queue.

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