12.07.2015 Views

Project (Phase 1) – 3% - MetaLab - Universiti Tenaga Nasional

Project (Phase 1) – 3% - MetaLab - Universiti Tenaga Nasional

Project (Phase 1) – 3% - MetaLab - Universiti Tenaga Nasional

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CSEB114: Principles of Programming<strong>Universiti</strong> <strong>Tenaga</strong> <strong>Nasional</strong><strong>Project</strong> (<strong>Phase</strong> 1) – <strong>3%</strong>This project holds 15% of your carry mark. It is a project that CAN be done in pairs, but doing it onyour own will increase your understanding on this subject. For those who plans to do this projectwith a partner, please be reminded that you will be asked THOROUGHLY on your contributionduring phase 4 (final phase).This project is divided into 4 phases. Each phase depends heavily on the previous phase. This firstphase will test your understanding on algorithm.QuestionNazwa Latifah has just graduated and secured a job at a small company called Kerepek MerepekSdn. Bhd. Her income for a month is RM2450. 7% of her income will be deducted for EmployeesProvident Fund (EPF). She plans to put aside 10% of her salary every month.Nazwa Latifah rents a house for RM300 per-month. Besides the house rent, she also has to pay forthe electricity usage, water consumption and internet usage. She is paying RM75 for her internetusage every month. The electricity usage and water consumption fees are as shown in Table 1 andTable 2.Table 1 Electricity TariffTariff A - Domestic Tariff UNIT RATESFor the first 200 kWh (1 - 200 kWh) per month sen/kWh 21.8For the next 100 kWh (201 - 300 kWh) per month sen/kWh 33.4For the next 100 kWh (301 - 400 kWh) per month sen/kWh 40.0For the first 100kWh (401 - 500 kWh) per month sen/kWh 40.2For the next 100 kWh (501 - 600 kWh) per month sen/kWh 41.6For the next 100 kWh (601 - 700 kWh) per month sen/kWh 42.6For the next 100 kWh (701 - 800 kWh) per month sen/kWh 43.7For the next 100 kWh (801 - 900 kWh) per month sen/kWh 45.3For the next kWh (901 kWh onwards) per month sen/kWh 45.4The minimum monthly charge is RM3.00USAGE0-20 m³21-35 m³35 m³ andaboveTable 2 Water TariffPRICE/CUM (RM)0.571.032.00MIN.PAYMENT(RM)6.00


CSEB114: Principles of Programming<strong>Universiti</strong> <strong>Tenaga</strong> <strong>Nasional</strong>Write an algorithm that will calculate Nazwa Latifah’s expenses for a month. The algorithm shouldread the electricity usage and water consumption to calculate the monthly fees. The algorithmshould also print the amount of money left for Nazwa Latifah to spend for that particular month.SubmissionSubmit to me:Your algorithm (should have your name), in .pdf format.How to submit:Refer to the table below for your group and where you should submit your answer:Section3A3BEmail to:cseb114.secA@gmail.comcseb114.secB@gmail.comBefore: 1 July 2013

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!