The code prompts the user to enter a blood type and Rh factor, creates a BloodData object with the input values, and displays and prints the blood type and Rh factor to the console. If no values are entered, it creates a BloodData object with default blood type O and Rh factor +, displays and prints these values. It then prints a message indicating the blood type is added to the blood bank.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
323 views2 pages
04 Hands-On Activity 1
The code prompts the user to enter a blood type and Rh factor, creates a BloodData object with the input values, and displays and prints the blood type and Rh factor to the console. If no values are entered, it creates a BloodData object with default blood type O and Rh factor +, displays and prints these values. It then prints a message indicating the blood type is added to the blood bank.