Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,584 members, 7,812,911 topics. Date: Monday, 29 April 2024 at 10:07 PM

Health Proffessionals And Doctors U Can Make Use Of This For Ur Hospitals - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Health Proffessionals And Doctors U Can Make Use Of This For Ur Hospitals (835 Views)

Can Blog Be Develope From Scratch Without The Use Of Wp Or Blogger? / How To Get Data From A Website And Make Use Of It In Your Website / [TUT] How To Make/use Single Name On Facebook (2) (3) (4)

(1) (Reply)

Health Proffessionals And Doctors U Can Make Use Of This For Ur Hospitals by donkoleone(m): 3:37pm On Nov 25, 2008
import java.util.Scanner;

public class medical
{
private String hospitalName;

public medical( String name )
{
hospitalName = name;
}

public void setHospitalName( String name )
{
hospitalName = name;
}

public String getHospitalName()
{
return hospitalName;
}
public void displayMessage()
{
System.out.printf( "ANALYSIS PROGRAMME FOR HEALED CANCER PATIENTS\n at %s\n", getHospitalName() );
}

public void analysis()
{
Scanner input = new Scanner( System.in );

int counter=0;
int average;
int total = 0;
int result;

System.out.println( "\nENTER MEDICAL RESULT OR -1 TO EXIT:" );
result = input.nextInt();

while( result != -1 )
{
total = total + result;
counter = counter + 1;
System.out.print( "ENTER MEDICAL RESULT OR -1 TO EXIT:" );
result = input.nextInt();
}



average = total / counter;

System.out.printf( "\nAVERAGE NUMBER OF PEOPLE HEALED: %d" , average );
}

}







public class medical1
{

public static void main( String args[] )
{

medical nurse = new medical("GRAYS HOSPITAL"wink;

nurse.displayMessage();

nurse.analysis();

}

}
Re: Health Proffessionals And Doctors U Can Make Use Of This For Ur Hospitals by candylips(m): 4:00pm On Nov 25, 2008
Do you know what object oriented programming is ?

You code is a very crude implementation of wht it is

(1) (Reply)

Please Urgently Assist Me With The Solution To This Program Using Pascal Program / Who Need A Java2 Se Certification Dumbs By Sun Microsystem / Microsoft Access Help

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.