Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the coding clearly.I need to understand how to solve this question. QUESTION 2 WashNDry is a self-service laundry mart. The laundry machine operates

image text in transcribed

image text in transcribed

Please write the coding clearly.I need to understand how to solve this question.

QUESTION 2 WashNDry is a self-service laundry mart. The laundry machine operates using 50 cent coins. There are two types of laundry machines and dryers charges for each type of machine. The following tables show the Laundry machine Charge(RM)- 4.50 10 kg maximum capacity 15 kg maximum capacity 6.00 Charge (RM) 3.50 4.00 Dryer 10 kg maximum capacity 15 kg maximum capacity A customer may use more than one machine. For example: If the customer uses: 10 kg maximum capacity - 2 laundry machine 15 kg maximum capacity -1 laundry machines 10 kg maximum capacity-1 dryer The charges would be: 2 * 4.50 + 1 * 6.00 + 1 * 3.50 = RM18.5 Therefore, 37 pieces of 50 cent coins are needed by this customer Based on the information: a) Write a function named int calccoins1 (int,int,int,int) that receives the number of laundry machine and dryer used by the customer. The function will determine how many pieces of 50 cents coins a customer needs to do the laundry 6 marks) b) Write a function named int calccoins2 (int,int) that receives number of detergent and softener. The function will calculate the number of 50 cents coins (4 marks) needed for the laundry detergent and the softener if the cost is RM1.00 each

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

Explain in brief the functions and functioning of stock exchanges.

Answered: 1 week ago