CIS 115 Week 8 Final Exam

CIS 115 Week 8 Final Exam

Author: Christine Farr


1. In the following pseudocode, what raise will an employee in Department 8 receive?
If department < 5="" then="">
Set raise = 100
If department < 9="" then="">
Set raise = 200
Set raise = 375
1. In the following code, how many times will the loop body be executed?
int x = 1;
while (x <= 7)="">
3. A zero-based array named testGrades has been declared and loaded with the values 85, 90, 72, 91, 98, 81, and 79. What value(s) will be stored in the array element testGrades[3]?
4. Write a program that computes the amount of money a club will receive from proceeds of its candy bar sales project. The user inputs the number of cases sold and the sale price per bar. Each case contains 20 bars, and each case is purchased at $5 per case from a local vendor. The club is required to give the student government association 10% of its sales. Display the total sales, cost of bars, amount to the student government, and club proceeds
1. A retail store is having a customer appreciation sale. The customer receives a discount on his or her total purchases based on the total dollars purchased. You are to develop pseudocode that will input the total dollars purchased from the user, determine the discount percentage, and then calculate and display the amount of the discount and the total amount due. When the purchases are more than $1000, the discount is 10%. When the purchases are $1000 or less, the discount is 5%.
Create a function called calcDiscount that will calculate and return the discount amount. Write the function and call it in the code

See More
Try a College Course Free

Sophia’s self-paced online courses are a great way to save time and money as you earn credits eligible for transfer to over 2,000 colleges and universities.*

Begin Free Trial
No credit card required

25 Sophia partners guarantee credit transfer.

226 Institutions have accepted or given pre-approval for credit transfer.

* The American Council on Education's College Credit Recommendation Service (ACE Credit®) has evaluated and recommended college credit for 21 of Sophia’s online courses. More than 2,000 colleges and universities consider ACE CREDIT recommendations in determining the applicability to their course and degree programs.