Question: You are appointed as a software developer to develop a web application for a COVID centre. The centre uses different types of vaccinations, including
You are appointed as a software developer to develop a web application for a COVID centre. The centre uses different types of vaccinations, including Pfizer, Moderna, and AstraZeneca. The people visit the centre to take the vaccinations. The people can take a maximum of three doses. The staff at the counter takes the information about the person, such as ID, name, date of birth, and Medicare number. The staff can be tellers and nurses who give the vaccination to the people. a) A staff class consists of ID, name and date of birth attributes. Can you explain whether you will use private or public access modifiers for the attributes? Justify your answer (2 marks) b) How will you set values for the attributes outside the class if the attributes are private? (2 marks)
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
a For the attributes ID name date of birth in the staff class its a good practice to use private acc... View full answer
Get step-by-step solutions from verified subject matter experts
