473,786 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

General homework help

2 New Member
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 calculateAvgPre ssure 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 avgBloodPressur e methods.
 Provide a complete java documentation for class Patient.
May 26 '07 #1
2 1652
blazedaces
284 Contributor
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 calculateAvgPre ssure 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 avgBloodPressur e 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 New Member
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 calculateAvgPre ssure 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 avgBloodPressur e 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 calculateAvgPre ssure.

Good luck
sandy
May 27 '07 #3

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

Similar topics

7
1771
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 writing it out a million times. please help me. i have to write a program that you type in the age and it stores it in a text file then i have to catagorize them and when i hit the read button it shows how many times 18-35 was typed in, then how...
2
2281
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 class for awhile and don't know what I'm doing. I have included my (probably wrong) answers for the first few questions. It would be great if someone could tell me what is missing or what I need to work on at least just for the first few. I...
11
1713
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 user inputs until it hits 100. At 100 it should stop. That's not the problem, in fact, that part works. It's the adding that isn't working. How can my program add 2 + 7 and come up with 14? I'm posting my code (so that you may all laugh). ...
1
1581
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 there will be. The user will be prompted to enter score 1, score 2, etc. After the scores are entered the computer will print the total number of points, the average score, and the number of scores. The program will ask the user if he/she wants...
5
2998
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 message. There should be a function call to restaurant() that accepts the message as an argument named menu and then displays the message using the pointer notation *(menu + i). b. Modify this restaurant() function to alter the address in message....
1
1564
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 corresponding value of type double. If the string supplied is not a valid number, it should return 0.0 as its result. Note that you can use the method Double.parseDouble() to do the hard work for you. ...
8
29169
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 classes: Card.java, Deck.java and DeckTester.java. The specification for each class is given below. Card.Java This is a simple class that represents a playing card. Card has two attributes: • rank which is a String that represents the value...
3
4237
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++) { Console.Beep(); ***************** //I have no idea what to put for 1 sec of silence }
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.