Creates an array of six divsales objects

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

A corporation has six divisions, each responsible for sales to different geographic locations. Design a DivSales class that keeps 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 six 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.

Reference no: EM13168129

Questions Cloud

You are to create a program : You are to create a program that will input a group of floating point values, storing them as double values in an array. This array will then be sent to three functions.
You are the admissions office at abc medical university : You are the Admissions Office at ABC Medical University. You have a large number of applicants for a very few number of available openings at your school. As a result, you need to set some high admission standards. To be accepted, a student ..
Numbers until the user wants and in the end display : Write a C program to enter the numbers until the user wants and in the end display the product of numbers entered by the user. The program should terminate once the user enters the character 'n' and continue computing product if user enters 'y'
Karatsuba''s divide-and-conquer algorithm : In class we discussed Karatsuba's divide-and-conquer algorithm for integer multiplication, which multiplies n-bit numbers by recursively multiplying n bit numbers. We take two numbers X and Y and split them each into their most significant half a..
Creates an array of six divsales objects : Write a program that creates an array of six 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 ..
Create a class in java to enable its object to be persiste : How do you create a class in Java to enable its object to be persistent? What are Java data streams and how are they used to facilitate storage and retrieval of persistent objects?
A sorting algorithm is described as stable : A sorting algorithm is described as stable if equal elements are in the same relative order in the sorted sequence as in the original sequence.
Create a flowchart that programs a robot to recognize : Create a flowchart that programs a robot to recognize how many playing cards you have and to put them in order from smallest to largest
Explain the eguation fot the neutralization reaction : write the balance the eguation fot the neutralization reaction between H2 SO4 KCH

Reviews

Write a Review

C/C++ Programming Questions & Answers

  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.

  Write a function template square()

Write a function template Square() that returns the square of its only argument.

  Distinguish syntax and purpose of while-loop and for-loop

Distinguish the syntax and purpose of while-loop and syntax of a for-loop. Give C++ code examples of both loops and descriibe the main differences.

  Draw the heap

Eric Rowe Starting with an empty minheap, draw the heap after each the completion of the following operations  and repeat for a maxheap (replace removeMin() with removeMax()). Upload your drawings here. Hand drawn is fine:

  Flipflaps - game based on pancake sorting

The project is to design and write a C++ 11/FLTK game program with a graphical user interface.The game is based on "pancake sorting,", which actually has some mathematical significance.

  Write a c++ program to draw the five olympic rings

Write a C++ program to draw the five Olympic rings. Make the circles have a thickness of 5 pixel

  Write a program that fills in an array

Write a program that fills in an array, a, of 25 integers where each element contains the sum of all the previous elements plus 1, e.g., a[0] is 1 and a[3] is equal to a[0] + a[1] + a[2] + 1.

  Make 2-dimensional array

make 2-dimensional array a bit of life and bringing them from the abstract to the concrete realms

  Test a program that prompts for the user

Write and test a program that prompts for the user to input a file name and uses two functions head() and tail() - head() displays the first 10 lines of a file

  A company that market is publishing both book and audio cass

A company that market is publishing both book and audiocassette versions

  Program that will ask for a month

Write a program that will ask for a month (1-12) and a year (yyyy). the program should then produce a calendar showing the month name and year and have all of the days displayed under it.

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

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