PRN212_PE_SU25_Fuda_4097.webp
Pride20031

PRN212_PE_SU25_Fuda_4097.webp

☑Kizspy.me

Zoom
The class should have:

о
A property Records of type List<T> to store a collection of medical records.
A method AddRecord(T record) to add a record to the list.
A method GetAllRecords() to return an IEnumerable<T> containing all records.
。 A method RemoveRecord(T record) to remove a specific record from the list.
о
A method GetRecordCount() to return the total number of records.
3. Create a Patient class (1.0 mark):


The Patient class should have properties: PatientID (int), FullName (string), Age (int),
BloodType (string), TreatmentCost (decimal).
GetAgeCategory: Returns age category as string ("Child" for age < 18, "Adult" for 18-
65, "Senior" for > 65).
• Override the ToString() method to display patient information in the format:
"PatientID - FullName (Age years, BloodType) - Cost: $TreatmentCost"
4. Use the Generic Class (1.5 marks):
In the Main function, you must implement the following tasks:


+150%
Create an instance of Medical Record<string> and add 3 diagnosis descriptions using
AddRecord() method.
Display all diagnoses and the total count using GetAllRecords() and GetRecordCount()
Close
Chưa có bình luận nào.

Thông tin

Category
PRN212
Thêm bởi
Pride20031
Ngày thêm
Lượt xem
1,186
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom