Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Dr Ho Coaching Centre gives lessons on three programming languages: Python, Java and C++. They have divided each programming language into a number of topics such as if-statement, while-loop, and for-loop. They teach each topic through a standard one-hour long lesson.

Students can request any number of additional hours on the topics that they have already studied. They can also request for any number of practice tests at the centre.

The centre charges for each standard lesson, additional hour and test according to the table below.

LanguageFee for each LessonFee for an additional hourFee for each test
Python $300 $200 $250
Java $200 $150 $150
C++ $175 $175 $170

For example, if a student studying Python requests 20 topics, 10 additional hours and 5 tests the total tuition fee for him/her will be ($6,000 + $2,000 + $1,250) = $9,250.

The Principal of Dr Ho Coaching Centre (Dr Wise Ho) contracts you to build a computer system, Power of Knowledge (PK), for them in Python.

PK will ask them to input, for a student, the name of the programming language that the student wants to study, the number of topics/lessons that he/she wants to study, the number of additional hours that he/she wants to study, and the number of tests that he/she wants to sit for. Based on the inputs the program will compute and display the tuition fee for the lessons, additional hours and tests. It will also display the total tuition fee.
PK will then ask Dr Ho "Do you want to compute the tuition fee for another student?"

If Dr Ho wants to compute the tuition fee for another student (i.e. enters "Y" or "y" to the question above), PK will ask for all these inputs again for the new student, and compute and display the total tuition fee for the new student. The program will then again ask Dr Ho "Do you want to compute the tuition fee for another student?"

The above process will continue as long as they want to compute the tuition fee for another student. However, if Dr Ho does not want to compute the tuition fee for another student (i.e. he enters anything other than "Y" or "y") then the program will exit.

A typical example of the display of your program can be as follows. Your program MUST follow the same display style.
---------------------------------------------------------------------------------------------- 
Welcome to Dr Ho Coaching Centre
-----------------------------------------------------------------------------------------------
Enter the name of the programming language: Python
Enter the number of lessons: 20
Enter the additional hours: 10
Enter the number of tests: 5
Tuition fee for the lessons (in dollars): 6000
Tuition fee for additional hours (in dollars): 2000
Tuition fee for the tests (in dollars): 1250

Total tuition fee (in dollars): 9250
Do you want to compute the tuition fee for another student? Y
Enter the name of the programming language: Java
Enter the number of lessons: 25
Enter the additional hours: 10
Enter the number of tests: 10
Tuition fee for the lessons (in dollars): 5000
Tuition fee for additional hours (in dollars): 1500
Tuition fee for the tests (in dollars): 1500

Total tuition fee (in dollars): 8000
Do you want to compute the tuition fee for another student? N
Good Bye.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91792855

Have any Question?


Related Questions in Computer Engineering

Question what sequence of numbers would be printed by the

Question : What sequence of numbers would be printed by the following recursive function if we started it with N assigned the value 1? def Exercise (N): print(N) if (N Exercise(N + 1) print(N)

Espn pays the nfl 11 billion per year for 8 yrs for the

ESPN pays the NFL $1.1 Billion per year for 8 yrs for the right to exclusively televise football. What is the NPV of the investment if the parent Disney CO has an opportunity interest rate that is equal to the cost of ca ...

Select one of the discussion topics and respond begin your

Select one of the discussion topics and respond. Begin your response by indicating which question you chose. Discussion topics: Section 4.1 Would you prefer a class in which 10 percent get A's and everyone competes for g ...

Question suppose the streets in a city are laid out in a

Question : Suppose the streets in a city are laid out in a perfect grid with avenues A through Z running parallel east-west, and First through Tenth Streets running parallel north-south. Give a count of the number of sho ...

Question suppose we perform a sequence of n operations on a

Question : Suppose we perform a sequence of n operations on a data structure in which teh ith operation costs i 2 of i is an exact power of 2 and 1 otherwise. Use aggregrate analasys and accounting method to determine th ...

Which will take fewer flips on average successively

Which will take fewer flips, on average: successively flipping a quarter until the pattern HHT appears, i.e., until you observe two successive heads followed by a tails; or successively flipping a quarter until the patte ...

You have been offered a contract worth 1 million per year

You have been offered a contract worth 1 million per year for five years. However, to take the contract, you will need to purchase some new equipment. Your discount rate for this project is 12%. You are still negotiating ...

Software engineeringsuppose you are writing software for a

Software Engineering: Suppose you are writing software for a radio station that manages its playlists. The program will generate candidate playlists from a record library automatically and station personnel can then chec ...

Simple coding help needed for java programhere is the

SIMPLE CODING HELP NEEDED FOR JAVA PROGRAM Here is the program description: Write a program that supports the following operations: int add(string login, string time, int priority, int size, int handle): add a new reques ...

Question having separate level 1 caches for instructions

Question : Having separate level 1 caches for instructions and data is a popular technique. Describe how this might pay off if a short loop of code that is operating on a giant array. Imagine that instructions and data e ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As