Project #83808 - C++ Help

  • Assignment 1: Drop Lowest Grade – Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It must have the following functions:
    • void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function must be called by main once for each of the six scores to be entered (so 6 times).
      • Validate the test scores entered are greater than or equal to 0 and less than or equal to 100.
    • void calcAverage() should calculate and display the average of the five highest scores. This function must be called just once by main, and must be passed the six  scores.
    • int findLowest() should find and return the lowest of the lowest scores passed to it. It must be called by calcAverage, which uses the function to determine which of the six scores to drop.

 

  • Assignment 2: Rock, Paper, Scissors, Lizard, Spock game – Write a program that will play this game against the computer. The game should end once there is a winner. If the game is a tie then the program must make the user play again, until there is a winner. Once there is a winner, the program (game) must end. When the program begins, a random number is created between 1 and 5. These values will be used as follows: 
    • 1 – Rock
    • 2 – Paper
    • 3 – Scissors
    • 4 – Lizard
    • 5 – Spock

    Use a menu to prompt the user for their choice, using the same values as above. The program should then display the computer's choice and indicate who has won. A winner is selected using the following rules:

    • Scissors cut paper
    • Paper covers rock
    • Rock crushes lizard
    • Lizard poisons Spock
    • Spock smashes (or melts) scissors
    • Scissors decapitate lizard
    • Lizard eats paper
    • Paper disproves Spock
    • Spock vaporizes rock
    • Rock breaks scissors

    The program must be divided into the following functions at least:

    • int getUserChoice()
    • int getComputerChoice()
    • void determineWinner(int, int)
    • void displayChoice(int)

Subject Computer
Due By (Pacific Time) 09/27/2015 09:00 pm
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy