Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Open the file BloodData.java that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh

Open the file BloodData.java that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and ). Create a default constructor that sets the fields to O and +, and an overloaded constructor that requires values for both fields. Include get and set methods for each field. Open the file TestBloodData.java and click the "Run Code" button to demonstrate that each method works correctly.

I'm experiencing issues everytime I try to compile. I am attaching a picture of my code from BloodData.java. I need help figuring out where I have gone wrong. image text in transcribed

BloodDatajavaPatient.java TestBloodData.java TestPatient.java 1 public class BloodData 3/ declare private variables here 4 private String bloodType; 5 private String rhFactor; 6 7 public BloodData() // add default constructor values here bloodType"O"; 10 rhFactor"+"; 13 public BloodData(String bType, String rh) // add constructor logic here bloodTypebType; 15 16 17 18 19 20 public void setBloodType(String bType) 21 // add method code here this.bloodType bType; 23 25 public String getBloodType) 26 27 28 29 30 public void setRhFactor (String rh) // add method code here return bloodType; // add method code here this .rhFactor = rh; public String getRhFactor() 35 36 37 38 39 40 // add method code here return rhFactor

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

Give a "row vector proof" of Theorem 2.8.

Answered: 1 week ago