You are on page 1of 2

130716 FM-BINUS-AA-FPT-66/R6

Soal Tugas Mandiri


Assignment Case

COMP6178
Intoduction to Programming
Teknik Informatika C3-COMP6178-YF01
Computer Science
Periode Berlaku Semester Pendek 2015/2016 Revisi 00
Valid on Compact SemesterYear 2015/2016 Revision 00

Soal
Case

Registration Form
Registration Form is a program to calculate total price of the purchase form. You as a
programmer are asked to create this program with the following criteria:
 First, the program will ask user to input the name. Validate the name length must be
between 5 and 30 characters.
 After that, the program will ask user to input the major. Validate the major must be either
“Computer Science” or “Information System” (case sensitive).
 Every major has its own price according to this table:
Major Price
Computer Science 200000
Information System 150000
 After that, the program will ask user to input the quantity. Validate the quantity must be
numeric and between 1 and 10.
 Every quantity will get a discount according to this table:
Quantity Discount
more than or equals to 5 20%
more than or equals to 3 10%

Halaman : 1 dari 2
Page 1 of 2
130716 FM-BINUS-AA-FPT-66/R6

 Then, the program will calculate the total price based on price, quantity, and discount
with the following formula:

Total price = (quantity * price) – (discount * price * quantity)

 After that, the program will show the details of the form, discount, and total price.

Figure 1. Input data and calculation result

Please run the EXE file to see the sample program.

Halaman : 2 dari 2
Page 2 of 2

You might also like