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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education