Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Due Date: 11:59 p.m. EST, Sunday of Unit 3 Points: 100 Overview: In this assignment, you will be analyzing how to use a loop control variable, create nested loops, avoid common loop mistakes, use...

1 answer below »


Due Date: 11:59 p.m. EST, Sunday of Unit 3
Points: 100
Overview:
In this assignment, you will be analyzing how to use a loop control variable, create
nested loops, avoid common loop mistakes, use constants with a
ays, search an a
ay
for an exact match, and use parallel a
ays.
Instructions:
Complete the following programming exercises:
1. Design an algorithm for a program that asks the user to enter an integer value
etween 1 and 100, inclusive. The program should use an input validation loop
to make sure that the user has entered a value within the co
ect range. Once
the user has entered a value within the co
ect range, the program should
congratulate the user and display the value the user has entered. Use the
constants MIN = 0 and MAX = 100 in the algorithm design.
What is the advantage of using constants?
2. Design an algorithm that asks a user to enter their exercise goal for the week in
minutes. The program should then ask the user to enter the number of minutes
that have exercised over the past seven days. The program should display the
goal and the actual number of minutes exercised. If the user has met or
exceeded their goal the program should display a congratulatory message.
Otherwise, the program should display a message encouraging the user to try
harder next week
3. Design an algorithm for a program that helps a teacher determine the average
grade for her students. For each student in the class, the teacher will input the
student’s name and three test scores (use a for loop to input the three test
scores). The program should use an input validation loop similar to that in
Progam 3.1 to ensure that the grades entered are between 0 and 100, inclusive.
The program should calculate the student’s average grade and display the
student’s name and average grade. A student name of “XX” signifies the end of
the student grade processing. Once all of the students’ information has been
entered, the program should display the number of students and the overall
average grade for all of the students should be displayed.
What type of loop is being used to process all of the students’ grades? What is
the value “XX” called?
4. Design an algorithm for a program That asks the user to enter ten numbers that
will be stored in an a
ay (Hint: for loop). After the user has entered the ten
numbers the program should find and display the sum of all of the numbers, the
average of all of the numbers, the lowest value of all of the numbers, and the
highest value of all of the numbers.
5. Roy L. Fuchs used car emporium needs a program to help it find the commission
for all of its salespersons for the month. The program should use parallel a
ays,
“names”, “sales_totals”, and “commission” to store the employees’ names, total
sales for the month, and the commission amount earned. Develop an algorithm
for a program that asks the user to enter up to ten employee names and saves
the names in the “names” a
ay. Note: there may be less than 10 employees.
The program should then display each employee’s name and asks the user to
enter the total dollar amount of sales for each employee ($0.00 to $100,000.00)
and stores this value in the “sales_total” a
ay. The program should then
calculate the amount of commission, based on the table below, and store the
value in the “commission” a
ay. Lastly, the program should display each
employee’s name and the amount of commission that the employee has earned
for the month.
Sales Amount Commission Rate
$ 0.00 - $ 30, XXXXXXXXXX%
$ 30,000.01 - $ 60, XXXXXXXXXX%
$ 60,000.01 - $ 75, XXXXXXXXXX%
$ 75,000.01 - $ 100, XXXXXXXXXX%
Requirements:
• Show your work in a Word document.
o Include all your work for each question.
o You can include screenshots of work done on paper.
• For all justification exercises, remember to use the definitions and principles that
we have learned thus far.
Be sure to read the criteria by which your work will be evaluated before you start
and again after before you submit it.
Evaluation Ru
ic for Loops and A
ays Assignment
CRITERIA Deficient
Needs
Improvement
Proficient Exemplary
XXXXXXXXXXPoints XXXXXXXXXXPoints XXXXXXXXXXPoints) (20 Points)
Program #1 The program is
missing or does
not meet any of
the program
equirements.
Some program
equirements are
met.
Most program
equirements
are met.
All program
equirements
are met.
Program #2 The program is
missing or does
not meet any of
the program
equirements.
Some program
equirements are
met.
Most program
equirements
are met.
All program
equirements
are met.
Program #3 The program is
missing or does
not meet any of
the program
equirements.
Some program
equirements are
met.
Most program
equirements
are met.
All program
equirements
are met.
Program #4 The program is
missing or does
not meet any of
the program
equirements.
Some program
equirements are
met.
Most program
equirements
are met.
All program
equirements
are met.
Program #5 The program is
missing or does
not meet any of
the program
equirements.
Some program
equirements are
met.
Most program
equirements
are met.
All program
equirements
are met.


Due Date: 11:59 p.m. EST, Sunday of Unit 2
Points: 100
Overview:
In this assignment, you will continue your research into different programming
paradigms through the evaluation of Structured, Procedural, Functional, and
Object_Oriented paradigms. You will be analyzing sequence, selection, and loop, the
elational comparison operators, precedence when combining AND and OR operators,
and the case structure.
Instructions:
Part 1: Research – Programming Paradigms
In Unit 1, you researched early programming languages and object-oriented
programming(OOP). For this portion of the assignment, research the three
programming paradigms listed below. Describe each paradigm and how each
differs from OOP. Explain which paradigm you believe to be the best for most
programs.
• Structured Programming
• Procedural Programming
• Functional Programming
Part 2: Programs – Using Decision Logic Structures:
1. Design a program that asks the user to enter the length and width of two
ectangles, Rectangle A and Rectangle B. Calculate the area of the two
ectangles and display to the user if Rectangle A has a larger area, or if
Rectangle B has the larger area, or if the two areas are equal.
2. The Acme company would like a program that they can use to quickly screen
applicants’ qualifications for a job in their anvil factory. A potential employee
must have a score of at least 85 on their anvil aptitude test and have a college
degree in anvil engineering or have previous anvil factory experience. The



CIS216 – Programming Principles
Structure and Making Decisions
program should enter the aptitude test score, a “Y” or “N” for the college
degree, and a “Y” or “N” for previous experience. The program should then
display if the applicant should be accepted or rejected based on their
qualifications. Note: this program should use logic operators (AND, OR, NOT)
as required to create a single conditional statement
3. Write a program that accepts a student’s numerical grade and returns the
co
esponding letter grade. If a grade less than zero or greater than 100 is
entered, the program should display an e
or message. The program should
also use a module to determine the appropriate grade. Letter grades are
determined as follows:
0 – 59 F
60 – 69 D
70 – 79 C
80 – 89 B
90 – 100 A
4. Write a program that simulates a vending machine. The price of items in the
vending range from $0.05 to $0.95. The vending machine only accepts $1.00
ills. Write a program that accepts the price of an item and calculates the
co
ect change using the least amount of quarters, dimes, nickels, and pennies.
If a price is entered that is less than $0.05 or greater than $0.95 should display
an e
or message and the amount of change should not be calculated.
5. Write a program that asks a user to enter two numbers and one of the following
letters: A, S, M, or D. If the letter A is entered, the program should add the two
numbers. If an S is entered, the program should subtract the two numbers. If
an M is entered, the program should multiply the two numbers. If a D is
entered, the program should divide the two numbers. The program should then
display the results.
If the user enters any letter besides A, S, M, or D, the program should display
an invalid option e
or message. If the user enters D and a zero for the second
number, the program should display a cannot divide by zero e
or message.
The program should use the case structure to determine the co
ect action to
e taken given the user’s input.
Requirements:
• Show your work in a Word document.
o Include all your work for each question
Answered 1 days After Dec 05, 2021

Solution

Ketaki answered on Dec 07 2021
123 Votes
/*## Design a program that asks the user to enter the length and width of two
ectangles, Rectangle A and Rectangle B. Calculate the area of the two
ectangles and display to the user if Rectangle A has a larger area, or if
Rectangle B has the larger area, or if the two areas are equal.*
#include #include#includeusing namespace std;
int main()
{
int lengthA,
eadthA, areaA;
int lengthB,
eadthB, areaB;
cout
"\nEnter the Length of Rectangle A: ";
cin
lengthA;
cout
"\nEnter the Breadth of Rectangle A: ";
cin
eadthA;
areaA = lengthA *
eadthA;
cout
"\nArea of Rectangle A: "
areaA;
cout
"\nEnter the Length of Rectangle B: ";
cin
lengthB;
cout
"\nEnter the Breadth of Rectangle B: ";
cin
eadthB;
areaB = lengthB *
eadthB;
cout
"\nArea of Rectangle B: "
areaB;
if(areaA > areaB)
{
cout
"\n Rectangle A is greater than Rectangle B ";
}
else if(areaA < areaB)
{
cout
"\n Rectangle B is greater than Rectangle A ";
}
else
{
cout
"\n Rectangle A and Rectangle B are Equal";
}
getch();
return (0);
}
** The Acme company would like a program that they can use to quickly screen
applicants’ qualifications for a job in their anvil factory. A potential employee
must have a score of at least 85 on their anvil aptitude test and have a college
degree in anvil engineering or have previous anvil factory experience. The
program should enter the aptitude test score, a “Y” or “N” for the college
degree, and a “Y” or “N” for previous experience. The program should then
display if the applicant should be accepted or rejected based on thei
qualifications. Note: this program should use logic operators (AND, OR, NOT)
as required to create a single conditional statement *
#include #include#includeusing namespace std;
int main()
{
int test_score;
bool college_degree,previous_experience;
cout
"\nEnter the test score of the applicant: ";
cin
test_score;
cout
"\nDo you have a college degree in anvil engineering(Y/N)? ";
cin
college_degree;
cout
"\nDo you have previous anvil factory experience(Y/N)? ";
cin
previous_experience;
if(test_score>=85 && college_degree=='Y' && previous_experience=='Y')
{
cout
"\n Applicant should be accepted";
}
else if(test_score>=85 && college_degree=='N' && previous_experience=='Y')
{
cout
"\n Applicant does not posses college degree";
}
else if(test_score>=85 && college_degree=='Y' && previous_experience=='N')
{
cout
"\n Applicant does not posses previous experience";
}
else if(test_score>=85 && college_degree=='N' && previous_experience=='N')
{
cout
"\n Applicant does not posses college degree and previous experience";
}
else if(test_score<85 && college_degree=='Y' && previous_experience=='Y')
{
cout
"\n Applicant does not qualify the required test score";
}
else if(test_score<85 && college_degree=='N' && previous_experience=='Y')
{
cout
"\n Applicant does not qualify the required test score and college degree";
}
else if(test_score<85 && college_degree=='Y' && previous_experience=='N')
{
cout
"\n Applicant does not qualify the required test score and previous experience";
}
else if(test_score<85 && college_degree=='N' && previous_experience=='N')
{
cout
"\n Applicant does not qualify the required test score and college degree and previous experience also";
}
getch();
return (0);
}
** The Acme company would like a program that they can use to quickly screen
applicants’ qualifications for a job in their anvil factory. A potential employee
must have a score of at least 85 on their anvil aptitude test and have a college
degree in anvil engineering or have previous anvil factory experience. The
program should enter the aptitude test score, a “Y” or “N” for the college
degree, and a “Y” or “N” for previous experience. The program should then
display if the applicant should be accepted or rejected based on thei
qualifications. Note: this program should use logic operators (AND, OR, NOT)
as required to create a single conditional statement *
#include #include#includeusing namespace std;
int main() {

Declare Variables
int test_score;
bool college_degree,previous_experience;
cout
"\nEnter the test score of the applicant: ";
cin
test_score;
cout
"\nDo you have a college degree in anvil engineering(Y/N)? ";
cin
college_degree;
cout
"\nDo you have previous anvil factory experience(Y/N)? ";
cin
previous_experience;
if(test_score>=85 && college_degree=='Y' && previous_experience=='Y')
{
cout
"\n Applicant should be accepted";
}
else if(test_score>=85 && college_degree=='N' && previous_experience=='Y')
{
cout
"\n Applicant does not posses college degree";
}
else if(test_score>=85 && college_degree=='Y' && previous_experience=='N')
{
cout
"\n Applicant does not posses...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here