bill billBook -bills: bill[] -doctor: String -invoiceNumber: String -visitDate: String -patientName: String -paid: boolean +bill(all parameters) +Setters/getters needed)...

What is the solution for this question (using java language)bill<br>billBook<br>-bills: bill[]<br>-doctor: String<br>-invoiceNumber: String<br>-visitDate: String<br>-patientName: String<br>-paid: boolean<br>+bill(all parameters)<br>+Setters/getters<br>needed)<br>+billBook(doctor:String,capacity:int)<br>+Setters/getters methods (if needed)<br>+addBills (): void<br>+payBill (invoiceNumber: String): int<br>methods (if<br>+printInvoice(): void<br>

Extracted text: bill billBook -bills: bill[] -doctor: String -invoiceNumber: String -visitDate: String -patientName: String -paid: boolean +bill(all parameters) +Setters/getters needed) +billBook(doctor:String,capacity:int) +Setters/getters methods (if needed) +addBills (): void +payBill (invoiceNumber: String): int methods (if +printInvoice(): void
2. Implement the class billBook using the above UML:<br>a. Write the constructor that takes as parameters the name of the doctor who has<br>examined the patient and the capacity which represents the size of the array bills.<br>b. Write the method addBills that reads the information of bill objects from the user,<br>creates the objects, and fill them into the array billBook.<br>c. Write the method payBill that:<br>It takes as parameter the invoive number.<br>Searches for the bill if available. If the bill is found, and it is not paid then the paid<br>value is updated to true. The method returns 1.<br>If the bill is not found, the value -1 is returned.<br>•<br>

Extracted text: 2. Implement the class billBook using the above UML: a. Write the constructor that takes as parameters the name of the doctor who has examined the patient and the capacity which represents the size of the array bills. b. Write the method addBills that reads the information of bill objects from the user, creates the objects, and fill them into the array billBook. c. Write the method payBill that: It takes as parameter the invoive number. Searches for the bill if available. If the bill is found, and it is not paid then the paid value is updated to true. The method returns 1. If the bill is not found, the value -1 is returned. •

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here