Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

HOSPITAL MANAGEMENT SYSTEM

import java.util.Scanner;
class Wrapper
{
public static void main(String args[])
{
int mob;
int padmitdays;
Float padmitmedcost=new Float(0);

Scanner in=new Scanner(System.in);

System.out.println("Enter the Patient name:");


String pname=in.nextLine();

System.out.println("\nEnter the Patient address:");


String padd=in.nextLine();

System.out.println("\nEnter the Patient mobile no:");


String pmobno=in.nextLine();
mob=Integer.parseInt(pmobno);

System.out.println("\nEnter the no of days patient


admited:"):
String padmit=in.nextLine();
padmitdays=Integer.parseInt(padmit);

System.out.println("\nEnter the medician cost of patient:");


String padmitmed=in.nextLine();
padmitmedcost=Float.valueOf(padmitmed);

Float
totalamt=compute(padmitdays,padmitmedcost.floatValue());
System.out.println("the patiehnt cost\n"+totalamt);
}
static float compute(int days,float c)
{
float cal;
cal=(150*days)+c;
return(cal);
}
}
OUTPUT

C:\Program Files\Java\jdk-11.0.1\bin>java Wrapper


Enter the Patient name:
Anita

Enter the Patient address:


Shastri nagar,belgavi

Enter the Patient mobile no:


87654321

Enter the no of days patient admited:


4

Enter the medician cost of patient:


10000

the patiehnt cost


10600.0

You might also like