Create functions for the following: Function descriptions:Function #1: superman Parameters: height - an integer representing the user's height in inches Description: Write a function for the Superman ride at Six Flags that determines whether the user is taller than 4'8" so that he or she can ride a roller coaster. If the user's height, which is provided by the parameter height, is greater than or equal to the minimum height, print the string 'Have a great ride!'. Otherwise, print the string 'Sorry. You must be at least 4 feet 8 inches to ride.' Test Cases: >>>superman(30) Sorry. You must be at least 4 feet 8 inches to ride. >>>superman(70) Have a great ride!   Function #2: largest Parameters:num1 - a floating-point number  num2 - an even number num3 - an odd number Description: Write a function that takes in three numbers as parameters and prints out the largest of the three. Then. test for an even number and an odd number and print each respectively. Please use comments and your answers have to tell me what is being printed out.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter11: Introduction To Classes
Section11.4: A Case Study: Constructing A Date Class
Problem 7E
icon
Related questions
Question

Create functions for the following:

Function descriptions:
Function #1: superman Parameters: height - an integer representing the user's height in inches Description: Write a function for the Superman ride at Six Flags that determines whether the user is taller than 4'8" so that he or she can ride a roller coaster. If the user's height, which is provided by the parameter height, is greater than or equal to the minimum height, print the string 'Have a great ride!'. Otherwise, print the string 'Sorry. You must be at least 4 feet 8 inches to ride.'

Test Cases: >>>superman(30)

Sorry. You must be at least 4 feet 8 inches to ride.

>>>superman(70)

Have a great ride!

 

Function #2: largest

Parameters:
num1 - a floating-point number 

num2 - an even number

num3 - an odd number

Description: Write a function that takes in three numbers as parameters and prints out the largest of the three. Then. test for an even number and an odd number and print each respectively.

Please use comments and your answers have to tell me what is being printed out.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning