Total Amount per Blood Type A: B: p500 O: AB: p703.5 Buy another blood? N Total Amount: p1203.5 Amount Paid: p1500.00 (will not accept if amount paid is less than total amount) 1. Design a program that allows user to input the ff. DESCRIPTION TYPE VARNAME Customer Number integer CustomerN SEX (M/F) char SEX Blood Type<0-3> integer btype No. of Liters float/double NOL Amount Paid float/double amt Total Amount float/double t_amt

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question

Customer Number Sex Blood Type No. Of Liters
2 M 1 4


Total Amount per Blood Type A:
B: p500
O:
AB: p703.5
Buy another blood<Y/N>? N

Total Amount: p1203.5
Amount Paid: p1500.00
(will not accept if amount paid is less than total amount)

1. Design a program that allows user to input the ff.

DESCRIPTION TYPE VARNAME
Customer Number integer CustomerN
SEX (M/F) char SEX
Blood Type<0-3> integer btype
No. of Liters float/double NOL
Amount Paid float/double amt
Total Amount float/double t_amt

2. Count Dracula prefers various type of blood, his rate per liter for each btype are given as follows.

Type A - p300 plus 20.0025 for every liter
B- p500 for the 1st 5 liters, and 60.0025 per liter in excess of 5 liters.
AB- p400 for the 1st 3 liters
P500 above 3 liters but below 5 liters
P700 if equal to 5 liters and p1.75 per liter beyond 5 liters
O- p250 per liter
7 liters of AB
excess = 2 *1.75
total AB amount = 700 + excess

3. Your program should process N number of transactions. (at least 2)
4. Validation for Sex is required. – M/m and F/f
5. Blood Type is defined by the ff
0 - A
1 - B
2 - AB
3 - O
6. Compute the Total Amount per liter per blood type, then display the Total Amount after user selected N for processing another transaction.

Expert Solution
steps

Step by step

Solved in 6 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,