Forumchem - Forum with AI(ALICE BOT & HAL9000) and TTS

More dificult for us, more easy for you
It is currently Sat May 11, 2024 2:40 am

All times are UTC





Post new topic Reply to topic  Page 1 of 1
 [ 1 post ] 
Author Message
 Post subject: For this assignment, you want to create the following classe
PostPosted: Wed Apr 28, 2021 5:23 am 
Offline
User avatar

Joined: Sat Oct 17, 2009 11:14 am
Posts: 132
For this assignment, you want to create the following classes: Hospital, Patient, Doctor, Drug and Person.?

To make sure that you have the correct relationships between your classes, detain in mind the has a, is a, and uses a relationship.

Use arrays where you see fit.

Write a Driver class that tests your classes by creating a bunch of objects.

--------------------

public class Hospital

Person people[ ] = new Person[10]


class Person extends Hospital

public String name;
public int ssn;



class Doctor extends Person

-Patient
-ID


class Patient extends Person

Drugs list[ ]


class Drug extends Patient

public String name;


class Driver

public static void main ( String [ ] args )

Hospital A = new Hospital();
A.people[0] = new Patient(B,1)
A.people[1] = new Doctor(Fred, 99)
Drugs Presc[] = new Drugs[8]
Presc[0] = new Drugs(Tylenol)
People[0].druglist[]
A.people[0].druglist[] = Presc()




Top
 Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: uceiioy and 13 guests


 
Search for:
 
Jump to:  

cron
Click me:
Powered by phpBB © 2000, 2002, 2005, 2007, 2008, 2009 phpBB Group
Chronicles phpBB3 theme by Jakob Persson. Stone textures by Patty Herford.
With special thanks to RuneVillage

This site have 4 type of tecnology in order to convert text to speech. By default you use the vozme tecnology. In order to know the other you need to sign for.


- Privacy Policy -