Write cpp program that processes the data of retail company

Assignment Help C/C++ Programming
Reference no: EM13865142

Write a C++ program that processes the data of a retail company with following requirements:

Define a new data type (struct) ofCustomer, with following members:

ID, first name, last name, number of items purchased, price of a single item, and total spending.

In themain function, declare an array ofCustomer.

The array should be created dynamically. In other words, you do not know how many customers
when you write the program. The program can asks a user to enter a number, or better yet, let the code to count the number of records in the file.

Themain function reads the data from a file of "customers.dat".

Each row represents a customer's record, with ID, first name, last name, number of item purchased and the price of a single item.

The data columns are separated by white spaces.

Store the customer data in the array.

Design a function,computeTotals, to calculate the total spending of each customer:

total = numItems * price.

computeTotals takes two parameters, the array and the number of customers.

computeTotals must be implemented with pointer notation (3-point deduction for using non-pointer notations).

In themain function, print out all records, including the total spending, such as:

1001 Scott Adams 3 22.86 68.58

1002 Nicholas Allen 8 10.00 80.00.

Reference no: EM13865142

Questions Cloud

Denotative meaning of a word is its dictionary definition : The denotative meaning of a word is its dictionary definition
Physical characteristic or quality of a product : A physical characteristic or quality of a product is referred to as a ____
Eurozone an optimal currency area : Is the Eurozone an optimal currency area? Explain your answer.
Write cpp program that processes the data of retail company : Write a C++ program that processes the data of a retail company with following requirements: Define a new data type (struct) ofCustomer, with following members
Relationship between sales calls and sales dialogue : Which of the following best reflects the relationship between sales calls and sales dialogue
Asymmetric shocks dealt with within a country : How are asymmetric shocks dealt with within a country? To what extent can this process be mirrored within the Eurozone?
About publically traded health care organizations : publically traded health care organizations
Describes common reason why salespeople dislike prospecting : Which of the following describes a common reason why salespeople dislike prospecting

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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