subject

2. Using the top-down method, please describe an algorithm for a program that calculates the cost of a car rental according to the following price schedule: Rental Period Type of Car 1-6 days 7-27 days 28-60 days Class B $27 per day Class C $34 per day $162 for 7 days, +$25 for each additional day $204 for 7 days, +S31 for each additional day, $276 for 7 days, +S43 for each additional day $662 for 28 days, +$23 for each additional day $810 for 28 days, +$28 for each additional day S1136 for 28 days, +538 for each additional day Class D Class D cannot be rented for less than 7 days 7 The algorithm asks the user to enter the rental period and type of car. The algorithm should display the appropriate cost. If a period longer than 60 days is entered, a message "Rental is not available for more than 60 days” should be displayed. If a rental period of less than 6 days is entered for Class D, a message "Class D cars cannot be rented for less than 6 days" should be displayed Create a flowchart for your algorithm.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
We as humans write math expression in infix notation, e.g. 5 + 2 (the operators are written in-between the operands). in a computer’s language, however, it is preferred to have the operators on the right side of the operands, i.e. 5 2 +. for more complex expressions that include parenthesis and multiple operators, a compiler has to convert the expression into postfix first and then evaluate the resulting postfix.write a program that takes an “infix” expression as input, uses stacks to convert it into postfix expression, and finally evaluates it. it must support the following operations: + - / * ^ % (example infix expression: (7 - 3) / (2 + 2)postfix expression: 7 3 - 2 2 + /result: 1guidelines: 1. you will need to use stacks in three placesa. one for the parenthesis check [char stack]b. one during infix to postfix [char stack]c. one during evaluation [int stack]for a and b above, you can use same array and same push, pop method as both ofthem are char. but for evaluation you have int stack and you might consider to createanother push pop method to handle it. maybe push_int, pop_int, etc. or find otherstrategy to utilize existing push pop method2. you can create a function for obtaining operator priority. that function should take anoperator as input and return its priority as an integer. this function will you a lot andreduce repeated code3. during evaluation you will need to convert char into integer. example for single digit: char c = '5'; int x = c - '0';
Answers: 2
question
Computers and Technology, 22.06.2019 15:00
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data.
Answers: 1
You know the right answer?
2. Using the top-down method, please describe an algorithm for a program that calculates the cost of...
Questions
question
Mathematics, 27.12.2020 15:00
question
Mathematics, 27.12.2020 15:00
question
English, 27.12.2020 15:00
question
English, 27.12.2020 15:00
question
Chemistry, 27.12.2020 15:00
question
Mathematics, 27.12.2020 15:00
question
Computers and Technology, 27.12.2020 15:00
question
Mathematics, 27.12.2020 15:00
Questions on the website: 13722363