473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

General homework help

2
Hello, I am a java beginner and I need series help in solving this program; my assignment is due after 2 days and I can't understand this program .
This is THE PROGRAM:

 The ABC medical clinic needs your help in building a Java application that can help in keeping track of patients, appointments, and clinic activities.
 Create a class Patient from which we can create objects to handle information about different patients. Each patient is automatically assigned an id number after his/her visit to the clinic. In addition, each patient object will store the patient’s name, patient’s temperature, patient’s blood pressure.
 Provide a constructor that takes the name of the patient as argument and
then creates a new patient object using the name provided. The program
should automatically assign ids to newly created objects. New patient
objects are created withdefault values assigned to the temperature and
pressure data members.
 Provide setter and getter methods as needed.
 Provide the method newVisit which appends the new readings to a specific
record. Note that different readings should be separated by commas.
Example:
Initially Zaki’s record was as follows:
id:7
name: Zaki
temp:
pressure:
After the first visit Zaki’s record became:
name: Zaki
temp: 37
press:12/6.5
After the second visit Zaki’s record will be:
name: Zaki
temp: 37,38
press:12/6.5,13/7
 Provide the method patientCount which helps us know how many
different patients we have in the clinic’s files. Do not consider the number
of different visits for the same patient.
 Provide the method calculateAvgPressure which prints the average of all
blood pressure readings for a certain patient. Note that each of the blood
pressure readings is a ratio between systolic an diastolic, and that the
different readings are kept in a comma delimited format.
Example : Assume that the BP readings of Zaki are: 11/6, 12/7, 13/5
His average blood pressure will be: The average BP is :12/6
Page 3 of 3
 Create the class Appointment from which we will create objects to handle
information about different appointments taken by patients. Each appointment has
an Appointment id (which is a unique number assigned by the clinic when taking
appointment), Patient’s id, Appointment date (dd-mm-yyyy), Time, Fees.
 Provide a constructor to create objects of this class.
 Provide setter and getter methods as needed.
 Create a package called “myproject” in which you add the two classes Patient and
Appointment.
 Write a driver that imports the package “myproject” and then:
 creates three patient objects
 creates two appointment objects
 tests the newVisit, patientCount, and avgBloodPressure methods.
 Provide a complete java documentation for class Patient.
May 26 '07 #1
2 1624
blazedaces
284 100+
Hello, I am a java beginner and I need series help in solving this program; my assignment is due after 2 days and I can't understand this program .
This is THE PROGRAM:

 The ABC medical clinic needs your help in building a Java application that can help in keeping track of patients, appointments, and clinic activities.
 Create a class Patient from which we can create objects to handle information about different patients. Each patient is automatically assigned an id number after his/her visit to the clinic. In addition, each patient object will store the patient’s name, patient’s temperature, patient’s blood pressure.
 Provide a constructor that takes the name of the patient as argument and
then creates a new patient object using the name provided. The program
should automatically assign ids to newly created objects. New patient
objects are created withdefault values assigned to the temperature and
pressure data members.
 Provide setter and getter methods as needed.
 Provide the method newVisit which appends the new readings to a specific
record. Note that different readings should be separated by commas.
Example:
Initially Zaki’s record was as follows:
id:7
name: Zaki
temp:
pressure:
After the first visit Zaki’s record became:
name: Zaki
temp: 37
press:12/6.5
After the second visit Zaki’s record will be:
name: Zaki
temp: 37,38
press:12/6.5,13/7
 Provide the method patientCount which helps us know how many
different patients we have in the clinic’s files. Do not consider the number
of different visits for the same patient.
 Provide the method calculateAvgPressure which prints the average of all
blood pressure readings for a certain patient. Note that each of the blood
pressure readings is a ratio between systolic an diastolic, and that the
different readings are kept in a comma delimited format.
Example : Assume that the BP readings of Zaki are: 11/6, 12/7, 13/5
His average blood pressure will be: The average BP is :12/6
Page 3 of 3
 Create the class Appointment from which we will create objects to handle
information about different appointments taken by patients. Each appointment has
an Appointment id (which is a unique number assigned by the clinic when taking
appointment), Patient’s id, Appointment date (dd-mm-yyyy), Time, Fees.
 Provide a constructor to create objects of this class.
 Provide setter and getter methods as needed.
 Create a package called “myproject” in which you add the two classes Patient and
Appointment.
 Write a driver that imports the package “myproject” and then:
 creates three patient objects
 creates two appointment objects
 tests the newVisit, patientCount, and avgBloodPressure methods.
 Provide a complete java documentation for class Patient.
We're not supposed to do your homework for you. If you have some code and are having trouble with errors and coming up with things, show us and we'll provide what help we can.

Let me ask you, if you were a person and this was your job, how would you do it? How would you keep track of patient Id's? Instead of imagining this as a "class" in a "program" imagine it's a piece of paper you have to fill in for every patient. Ask yourself, what ID do I give this patient, what temperature do I write for this one, if you have to count how many patients there are, how do you keep track of that?

It sounds simple, but really all you're doing is applying the same logic to code. Start it out and do some research, also, consult your teacher and friends (help each other out, it's the best way to learn, together, sounds corny, but it's true).

Hope that helps and good luck...
-blazed
May 26 '07 #2
sandyw
122 100+
Hello, I am a java beginner and I need series help in solving this program; my assignment is due after 2 days and I can't understand this program .
This is THE PROGRAM:

? The ABC medical clinic needs your help in building a Java application that can help in keeping track of patients, appointments, and clinic activities.
? Create a class Patient from which we can create objects to handle information about different patients. Each patient is automatically assigned an id number after his/her visit to the clinic. In addition, each patient object will store the patient’s name, patient’s temperature, patient’s blood pressure.
? Provide a constructor that takes the name of the patient as argument and
then creates a new patient object using the name provided. The program
should automatically assign ids to newly created objects. New patient
objects are created withdefault values assigned to the temperature and
pressure data members.
? Provide setter and getter methods as needed.
? Provide the method newVisit which appends the new readings to a specific
record. Note that different readings should be separated by commas.
Example:
Initially Zaki’s record was as follows:
id:7
name: Zaki
temp:
pressure:
After the first visit Zaki’s record became:
name: Zaki
temp: 37
press:12/6.5
After the second visit Zaki’s record will be:
name: Zaki
temp: 37,38
press:12/6.5,13/7
? Provide the method patientCount which helps us know how many
different patients we have in the clinic’s files. Do not consider the number
of different visits for the same patient.
? Provide the method calculateAvgPressure which prints the average of all
blood pressure readings for a certain patient. Note that each of the blood
pressure readings is a ratio between systolic an diastolic, and that the
different readings are kept in a comma delimited format.
Example : Assume that the BP readings of Zaki are: 11/6, 12/7, 13/5
His average blood pressure will be: The average BP is :12/6
Page 3 of 3
? Create the class Appointment from which we will create objects to handle
information about different appointments taken by patients. Each appointment has
an Appointment id (which is a unique number assigned by the clinic when taking
appointment), Patient’s id, Appointment date (dd-mm-yyyy), Time, Fees.
? Provide a constructor to create objects of this class.
? Provide setter and getter methods as needed.
? Create a package called “myproject” in which you add the two classes Patient and
Appointment.
? Write a driver that imports the package “myproject” and then:
? creates three patient objects
? creates two appointment objects
? tests the newVisit, patientCount, and avgBloodPressure methods.
? Provide a complete java documentation for class Patient.
Like blazedaces said think what you need to do.
You know that you have to make at least 2 classes Patient and Appointment.
Each class has several events to do. Break each class in their events.
How many data type are there and what types are they.
Chart out your class on paper and what data types you are using.
How will I store the data. arrays, arraylist....
How will you calculateAvgPressure.

Good luck
sandy
May 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: tjshadyluver | last post by:
ok i have gotten this damn project almost done but i am frustrated on this one step. getting 18-35 together and 36-50 and so on. here is my code how can i get them combined in one line instead of...
2
by: N3TB1N | last post by:
Let me try again. I could use some help with this assignment, even though my teacher does not grade assignments.but because I need to know this stuff for a test very soon, but haven't been in...
11
by: spawn | last post by:
but I've been struggling with this for far too long and I'm about to start beating my head against the wall. My assignment seemed simple: create a program that will cacluate the running total of...
1
by: mastern200 | last post by:
I need some homework help with an assignment due wed. I need to make a program where in this program calculates the average of a set of test scores. The program will ask the user how many scores...
5
by: karafire2003 | last post by:
I was wondering if someone can help me with my homework. here's the assignment: a. Write a C program that has a declaration in main() to store the string "What's for lunch?" into an array named...
1
by: itgetsharder | last post by:
Hey, i was wondering if anyone could help me. i have two questions that i cannot complete for a homework assignment: This method should convert its parameter (a string like "3.1415") to the...
8
by: garyrowell | last post by:
I have been at this programme for hours trying to work out what is wrong. Any help would be very much appricated. Here is the breif I received. The program This week you are going to write three...
3
by: alireza6485 | last post by:
I need to write a C# program that asks for a pattern and for each pattern beeps one and goes silence for 1 second. This is my code: for (int i=0;i< pattern; i++) { ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.