The ADSM Sales Corporation would like to have a listing of their sales over the past few months. Write a program that accepts any number of monthly sales amounts. Display the total of the values. Display a report showing each original value entered and the percentage that value contributes to the total. You may prompt the user for the number of values to be inputted. Use array to complete the task.
Create a class Students
•Data Members
•Students Name
•Student ID
•CGPA
•Department
•Member Functions
•Constructors / Destructors
•storeData // Reading from file
•fetchData // Writing into a file
•Driver
•Write 10 records in a file
•Read file contents from one file and store in another file
•Display file contents on screen
First make a Animal class as parent class it contain
-name and gender as data members
-eating as member function
Make 5 classes of Animal type and inherit from Animal class
A. Sheep
B. Goat
C. Cow
D. Buffalo
E. Zebra
-This class can override its parent class method and implements on its own way
-call its eating method in the base of polymorphism
Write a C++ program to accept a 5 digit integer and to validate the input based on the following rules.
Rules
1) The input number is divisible by 2. 2) The sum of the first two digits is less than last two digits. if the input number satisfies all the rules, the system prints valid and invalid, otherwise,
Example 1:
Enter a value: 11222
Output: Input number is valid
Example 2:
Enter a value: 1234
Output: Input number is invalid
Design a method that determines whether or not a binary tree is fully balanced. This method takes no parameters, and returns a boolean value: true if the tree is fully balanced, and false if it is not.
Rearrange Numbers in String
Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.
The input will be a single line containing a string.
The output should be a single line containing the modified string with all the numbers in string re-ordered in decreasing order.
For example, if the given string is "I am 5 years and 11 months old", the numbers are 5, 11. Your code should print the sentence after re-ordering the numbers as "I am 11 years and 5 months old".
Sample Input
I am 5 years and 11 months old
Sample Output
I am 11 years and 5 months old
Sample Input
I am 2 years and 3 months old. This sentence4 5should be 6rearr7anged8. If possible -9these negative-12 nums
Sample Output
I am 12 years and 9 months old. This sentence8 7should be 6rearr5anged4. If possible 3these negative2 nums
Question 3 (Marks: 40)
The college that you attend requires an application that will print out a Course Report. You are
required to create an application that will allocate the following course data:
COURSE CODE COURSE NAME STUDENT NUMBERS LECTURER
DISD Diploma in Software Development 35 Mr Jones
DIWD Diploma in Web Development 28 Mrs Smith
DIDM Diploma in Data Metrics 39 Mr Ntsinga
Create a class named Course_Details that will contain get and set methods for the course name,
student numbers and lecturer. In the Course_Details class include a method called Assign Venue
that will randomly generate a Venue/Class for the course. Venues can be from 1 to 3 only. Your
main class must include a static method to handle the printing of the course report.
Question 2 (Marks: 20)
The organisation you work for has asked you to create an interactive application that will assist
with the allocation of employees to a cell phone network provider and phone number generation.
You are required to prompt a user for three employee names which will randomly assign the
employee to either the Vodacom, MTN or Cell C network. The employees also require a randomly
generated phone number. The start of each phone number will begin with the following,
depending on the network provider:
NETWORK PROVIDER START
Vodacom 072
MTN 083
Cell C 084
The remaining numbers of the phone number must be randomly generated.
Question 1 (Marks: 40)
Sam runs a local musical equipment store in your neighbourhood. He has contracted you to create
an interactive application that will assist him with customer purchases. Create a class named
Customer Purchases that will contain get and set methods for a customer number, first name,
surname, product, price and quantity. Create a separate class called Printing that will include a
method called Print Details, that will print the Customer Invoice. In the Printing class include
another method called Customer Purchase Report which will display the following information:
REPORT OPTION PERCENTAGE
TAX 15%
COMMISSION 8.5%
DISCOUNT 10%
TOTAL (Price + Tax) – (Discount + Commission)
In your main class, capture all the customer purchase details required to produce the reports.
Make a games (or any other kind of program that you find interesting). Make sure you pick something that you are probably capable of doing. The point of this project is to show off your skills, and to create something very playable, with clear instructions and a great user experience. It’s much better to get a simple program working perfectly than to try to make an overly complicated game that ends up being very glitchy. Also, you must be able to competently explain every bit of your code.