C++ Answers

Questions answered by Experts: 9 913

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

GIven a class definition:

class Circle

{

   private:

     int radius;

   public:

     Circle (int inputRadius)

     { radius = inputRadius; }

}


Please provide 2 distinct ways to create circle_object with initial radius value = 5. 


Write a program that calculates different kinds of mathematical results based on the user’s menu selection. Ask a user to enter a number from 1 to 30. Establish an error trap to ensure that the number is in the indicated range. Display the following menu: 1. Calculate whether your entry is odd or even. 2. Calculate the cube of your entry. 3. Calculate a circle’s area using your entry as radius. Ask the user for his/her choice from the menu. Using a SWITCH statement (with an appropriate default), display the correct result from the user’s menu choice. Your program must calculate the correct response to each menu option.
Write a, C++ program to use pointers for both base and derived classes and call the member function . Use virtual key words

Explain at least not less than five differences between data-oriented programming and object-oriented programming. In your explanations, include concepts of data-oriented design, object-oriented design, and use at least five examples which should include source codes to support your arguments.


Explain at least not less than five differences between data-oriented programming and
object-oriented programming. In your explanations, include concepts of data-oriented
design, object-oriented design, and use at least five examples which should include
source codes to support your arguments.

Explain complement arithmetic and its significance in the computation


You are requested by a SuperStore (Spar) in Soshanguve to calculate it’s earning for the week (the store opens the entire week) and determine the day with the highest and lowest earnings. The Store comprises of two sections namely the Food section and the Liquor store.
Your C++ program should prompt the total sales for each section for each day and store the total sales for the day into an array. At the end of the week It should display a report for Management for the total sales for that week, the day the lowest sales and the day with the highest sales were recorded.
A man goes for shopping to buy vegetables. He picks up the basket and goes to the shelf of vegetables. The tray can hold up to 10kg only. So he carefully picks up the vegetables needed for one week and fills his basket. When he reaches the end of shelf, he finds he had filled only 8.5 kg. So he decides to refill with some more vegetables for his need. Write a C program to implement the refilling process using linked list.

B (C++) [27] You are requested by a SuperStore (Spar) in Soshanguve to calculate it’s earning for the week (the store opens the entire week) and determine the day with the highest and lowest earnings. The Store comprises of two sections namely the Food section and the Liquor store. Your C++ program should prompt the total sales for each section for each day and store the total sales for the day into an array. At the end of the week It should display a report for Management for the total sales for that week, the day the lowest sales and the day with the highest sales were recorded. Refer to below screen shot for sample Input and Output.



For this final assignment, you will use Qt to create a GUI version of the templated LinkedList you made for assignment 9.  


You may design your window as you wish, but it needs to have the minimum functionality:

  • Radio buttons to select between the different types of data your linked list will store(int, double, string, Rational, Date, Complex)
  • A button to display the contents of the linked list
  • The ability to display only a portion of the linked list
  • Buttons to push_back, push_front, pop_front, insert_sorted
  • Insert button that can insert an element at any spot in the list (have to define a new function in linked list class)
  • Button to perform select_sort
  • Button to remove_duplicates
  • Should have the ability to make a copy of a list and be able to retain and modify both copies (may make multiple copies).
  • Be able to modify any of the lists without losing any information going from one list to the other.
  • You may use vectors as long as you use your own vector class, not the one provided with C++/QtCreator.
LATEST TUTORIALS
APPROVED BY CLIENTS