Get 20% Off + $20 Signup Bonus ! Limited Time, Hurry !
Get 20% Off + $20 Signup Bonus ! Limited Time, Hurry !
Securing Higher Grades Costing Your Pocket? Book Your Assignment at The Lowest Price Now!
loader
Add File

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Stuck on Your Question?

Get 24x7 live help from our Top Tutors. All subjects covered.

loader
250 words

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Students Who Viewed This Also Studied

0 Page
Directed Resource Graphs

...

Course

5M0529

Subject

Programing

University

Rathmines College of Further Education

Season

Spring

0 Page
Watson IoT Platform Service Features

...

Course

MMI123998

Subject

Programing

University

Glasgow Caledonian University

Season

Spring

5 Pages
Management

 A test program that creates an instance of Cart, populates it with several orders (for both products and discount products), and uses a foreach loop to produce a formatted listing of the orders ...

Subject

Programing

27 Pages
OOP244 Computer Science

I need help making the Menu.h and Menu.cpp files, note the Menu Tester program can not be edited, also when coding only code what is asked in the Menu module and MenuItme Module, no extra code should ...

Course

oop244

Type

Programming

Subject

Programing

University

Seneca College

IT2414-Information Technology Services

Question

Answered

Assignments

Write a program that creates a Sales class. This program will read a space delimited file called “sales.dat”.   The order of the fields is:  salesNum, month, day, year, sales amount, vehicle type.  Commission will be calculated.  You will also need arrays for sales totals (4), commission totals(4) and vehicle type totals(3).  All of these items will be in the class Sales.

Requirements

1.Your class will have the following private member variables:

int salesNum

int month

int day

int year

double saleAmt

char vehicle;

double commission

double salesTotal[4]

double comTotal[4]

double vehicleTotal[3]

2. The class will have the following public member functions:

Default constructor – to set the member variables to 0

With the arrays, which we have not worked with in a class, each element in the array must be initialized to zero.  For example:  salesTotal[0] = 0.00;, then for 1,2,3 for all 3 of the arrays.

headings – as shown on the output below. 

processdata – open the file, check to make sure it’s there, process all records until the end of the file.

calcCommission – a function to calculate the commission

12,000 and below 2%

12001 to 17000    4%

17001 to 25000    5%

25001 to 40000    6%

40001 and up    7%

printResults – a function to print the report.  See output below.

calcTotals – a function to calculate the three different totals.  The totals are to be put in 3 separate arrays.  For example:  salesNum 10 will go in salesTotal[0], salesNum 11 will go in salesTotal[1], etc.  The comTotal array will work just like the salesTotal array.  The vehicle array will be cars at element 0, trucks at element 1 and used at element 2.  Many ifs in this function

printTotals – a function to print the Totals by Sales ID and the vehicle totals.  In this function, to get Cars, Truck and Used to print out, you will need to put them in a string array.

string description[3] = {“Cars”, “Trucks”, “Used”};

You will use for loops to print the 2 different set of totals out.  When printing out the vehicle totals, in the for loop you will use description[i] and it will get you the appropriate total for cars, trucks and used.

printResults, calcCommission and calcTotals will be called from processdata.  The other functions will be called from main.      

IT2414-Information Technology Services

Answer in Detail

Solved by qualified expert

Get Access to This Answer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

14 More Pages to Come in This Document. Get access to the complete answer.

MyAssignmenthelp.com has gained the status of premier assignment help provider in USA. The combination of highly qualified experts, wide range of service and affordable price play a significant role behind our overwhelming popularity among the students in USA. Some of our popular writing services include Marketing assignment help, mechanical engineering assignment help, English assignment help, taxation assignment help, electrical engineering assignment help.

More IT2414 IT2414-Information Technology Services: Questions & Answers

Q
icon

We aren't endorsed by this University

Directed Resource Graphs

...

View Answer
Q
icon

We aren't endorsed by this University

Watson IoT Platform Service Features

...

View Answer
Q

Management

 A test program that creates an instance of Cart, populates it with several orders (for both products and discount products), and uses a foreach loop to produce a formatted listing of the orders with their price, the number of items in the cart and the overall total price. Note: You can either ...

View Answer
Q
icon

We aren't endorsed by this University

OOP244 Computer Science

I need help making the Menu.h and Menu.cpp files, note the Menu Tester program can not be edited, also when coding only code what is asked in the Menu module and MenuItme Module, no extra code should be added, when coding the rule of three make sure (Copy constructor and Copy assignment are deleted) ...

View Answer

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the content removal request.

Choose Our Best Expert to Help You

5% Cashback

On APP - grab it while it lasts!

Download app now (or) Scan the QR code

*Offer eligible for first 3 orders ordered through app!

screener
ribbon
callback request mobile
Have any Query?