Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C# program Write an app that calculates and displays the parking charges for many customers who parked in the garage. Ask the user

Write a C# program
Write an app that calculates and displays the parking charges for many customers who parked in the garage. Ask the user if there is any more customer if answer is "No" then stop. Else continue.
From the calling app, call Calculatecharses(i) for each customer. Based on the return value from this method, display the $ amount.
Write a method Calculatecharges to determine the charge for each customer.
Step 1: Input - Get the hours parked for each customer.
Step 2: Calculate parking charges
The parking garage charges a $2.00 minimum fee to park for up to three hours.
The garage charges an additional $0.50 per hour for each hour or part there of in excess of three hours.
The maximum charge for any given 24-hour period is $10.00.
Assume that no car parks for longer than 24 hours at a time.
Step 3: Return the total parking charges for the customer.
2. Write a method IntegerPower(base, exponent) that returns the value.
For example, IntegerPower (3,4) calculates 3 power 4(or 3**3**3**3.
Assume that exponent is a positive integer and that base is an integer.
Method IntegerPower should use a for or while loop to control the calculation.
Do not use any Math-library methods.
Incorporate this method into an app that reads
a) Integer values for base and exponent
b) performs the calculation with the IntegerPower method.
C) returns the answer
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

=+How should it be delivered?

Answered: 1 week ago

Question

=+4 How does one acquire a global mindset?

Answered: 1 week ago