How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask LogicPro Your Own Question

LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 12558
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
29751445
Type Your Homework Question Here...
LogicPro is online now
A new question is answered every 9 seconds

Can I get this answer by tomorrow that you have already answered

This answer was rated:

Can I get this answer by tomorrow that you have already answered for someone else please?
http://www.justanswer.com/homework/7x0e0-logicpro-only-a-trading-company-three-divisions.html

for LogicPro only: A trading company has three divisions,





Resolved Question:



for LogicPro only:
A trading company has three divisions, each responsible for sales to different locations. Design a DivSales class that keeps the sales data for a division, with the following members:
 An array with four elements for holding four quarters of sales figures for the division.
 A private static variable for holding the total corporate sales for all divisions for the entire year
 A member function that takes four arguments, each assumed to be the sales for a quarter. The value of the arguments should be copied into the array that holds the sales data. The total of the four arguments should be added to the static variable that holds the total yearly corporate sales.
 A function that takes an integer argument within the range of 0-3. The argument is to be used as a subscript into the division quarterly sales array. The function should return the value of the array element with that subscript.
Write a program that creates an array of three DivSales objects. The program should ask the user to enter the sales for four quarters for each division. After the data are entered, the program should display a table showing the division sales for each quarter. The program should then display the total corporate sales for the year.

 For this question, name your class DivSales. For example, my class would be named: LeongLeeDivSales.
 Use inline member functions for all the method functions mentioned.
 You need to submit the following files:
1. DivSales.h: Specification (and inline member functions) for class and other functions should be in this .h file
2. DivSales_Demo.cpp : You need to write a separate program to test the class. In other words, main() is here.
Important: If you do not put to the above mentioned fields (class name and filename), you will get 0 point for the question.

SAMPLE RUN
Your output should look similar to the following. Things in bold are typed by the user.
Enter sales data for Division 1
Quarter 1: 1000
Quarter 2: 2000
Quarter 3: 3000
Quarter 4: 4000
Enter sales data for Division 2
Quarter 1: 2100
Quarter 2: 3200
Quarter 3: 4200
Quarter 4: 5200
Enter sales data for Division 3
Quarter 1: 6000
Quarter 2: 7000
Quarter 3: 8000
Quarter 4: 9000
================================
--- Report ---
Sales for Division 1
Quarter 1: $1000.00
Quarter 2: $2000.00
Quarter 3: $3000.00
Quarter 4: $4000.00
Sales for Division 2
Quarter 1: $2100.00
Quarter 2: $3200.00
Quarter 3: $4200.00
Quarter 4: $5200.00
Sales for Division 3
Quarter 1: $6000.00
Quarter 2: $7000.00
Quarter 3: $8000.00
Quarter 4: $9000.00
Press Enter to Continue.
Total Corporate Sales: $54700.00



Submitted: 3 months ago.


Category: Homework
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
LogicPro and 4 other Homework Specialists are ready to help you

Related Homework Questions