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

  Where may the class be accessed

What is an object's lock and which object's have locks? If a class is declared without any access modifiers, where may the class be accessed?

  Write unique, simple function in c++

Write unique, simple function in C++. Be sure you provide code that calls the function also. Visual Studio

  Reduce the numerator and denominator

Write the function  in C ++ to reduce the numerator and denominator in the Rat class to lowest terms.

  Write a mips program that uses a recursive implementation

Write a MIPS program that uses a recursive implementation of quick sort to sort an array of numbers. The values of the array will be given to you via standard input. The first number will be the number of elements in the array and followed by the ..

  Program user to enter student names and final grades

Write a program that would allow a user to enter student names and Final grades (e.g. A,B,C,D,F) from their courses. You do not know how many students need to be entered. You also do not know how many courses each of the students completed.

  Calculate and display the number of units of electricity

The manager of PG&E wants a program that calculates a customer's electric bill. He will enter the current and previous meter readings.

  Write a program that will read in 2 test score.

Write a program that will read in 2 test score. The instructor has decided to give each student 10 bonus point on each test. Print out each test score and the total after the bonus, the print the total number of points earned on the tests.

  Consider implementing subnetting to support three department

Consider implementing subnetting to support three departments within an organization. The three departments P, Q and R need support for 30, 40 and 60 hosts.

  Write two functions to be called by the main program

CSC250 Assignment. Write two functions to be called by the main program. One function is to calculate, in general, a truck's range, that is, the distance the truck can go on one tank of gas (we should probably say fuel. since the bigrig might use ..

  What are the contents of the array

What are the contents of the array after the subsequent loops complete - loops and also provide the iteration how to get it.

  Linked list in c++

If the following C++ code is valid, show the output. If it is invalid, explain why.

  Write in c++. read an inputfile.txt

write in C++.  read an inputFile.txt which contains integers that are virutal addresses, and I am suppossed to translate that into physical addresses using a page table and a transition lookaside buffer

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