The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 327 Weeks Ago, 5 Days Ago |
| Questions Answered: | 12843 |
| Tutorials Posted: | 12834 |
MBA, Ph.D in Management
Harvard university
Feb-1997 - Aug-2003
Professor
Strayer University
Jan-2007 - Present
C++ 1
Assessment Guide
Assessment2 – Simple Application
This assessment is worth 20% of you total assessment of this subject. You are required to
write a C++ program to solve all problems. All work is to be completed individually. If
parts or all of the source code you submit is not your own work, you will receive ZERO.
Task
This assessment is consist of 5 tasks. You need to prepare the following for each question
• Programming object list
• Algorithm
• C++ Coding
Scenario 1: Mathematics operation.
Write a C++ program that will display the calculator menu. The program will prompt the
user to choose the operation choice (from 1 to 5). Then it asks the user to input two
integer vales for the calculation.
Example
MENU
1. Add
2. Subtract
3. Multiply
4. Divide
5. Modulus
Enter your choice: 1
Enter your two numbers: 12 15
Result: 27
Continue? y Note: user entered values are shown in bold blue.
Scenario 2: Sorting Number
Write a C++ program (using function overloaded) to sort 10 integer values, or 10 long
values, or 10 double values. Number lists provide below:
valListInt = 23, 2, 34, 23, 43, 22, 32, 32, 43, 34
valListLong = 7000, 15, 34, 2373645, 43, 22, 9392929294, 46, 32, 111143
valListDbl = 23.3847239, 2.3974, 34.183734, 23.0, 43.36381, 22.3, 32.0, 32.1919,
43.938363, 34.38364
Scenario 3: Order number
Create the C++ Function named multiples so that it has two parameters x, and n. The
first parameter x will be overloaded with int, double and float. n will always be int. The
return type is void. A Function created from multiples will compute.
sum = 1 + x + 2x + 3x + ... + nx
e.g n = 4
sum = 1+x+2x+3x+4x
and display the result on screen. C++ 1 – Assessment Guide 1| C++ 1
Assessment Guide
Assessment2 – Simple Application
Scenario 4: Temperature record
Write a program that takes a maximum and minimum temperature of the city from
Monday to Sunday, and three functions that calculate on average temperature, maximum
temperature and minimum temperature of that week.
Example
Please enter this week temperature,
Monday: 19.0 14.0
Tuesday: 24.5 12.5
Wednesday: 22.0 9.5
Thursday: 17.0 9.0
Friday: 17.0 10.0
Saturday: 23.0 12.0
Sunday: 22.0 15.5
This week,
minimum temperature is: 9.0
maximum temperature is: 24.5
average temperature is: 16.21 Note: user entered values are shown in bold blue.
Scenario 5: String and Character Function
Write a program that reads in a string provided the user. Return the following statistics
about the string:
• Length
• Number of vowels
• Number of lower case characters
• Number of upper case characters
• Number of numerals
Number of other symbols
When is due
Week 12, late penalty would be applied refer to AIT late submission policy.
Submission
Submit your document and c++ project in Jivi using the following STRICT
filename convention and in ZIP format.
StudentNumber_FirstName_LastName_Assessment1.zip
Example: 1234_John_Doe_Assessment1.zip C++ 1 – Assessment Guide 2|
-----------