NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

package com.company;
import javax.swing.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;
public class Main {
private String name;
private float ID;

public void setName(String Mypatientname){
name = Mypatientname;
}
public String getName(){
return name;
}
public void setID(float myID){
this.ID=myID;
}

public float getID(){
return ID;
}

public void display (){
JOptionPane.showMessageDialog(null,"The patient's name : " +getName()+" The patient's ID: "+getID());}

public static void main(String[] args){
Main e= new Main();
String name=JOptionPane.showInputDialog("Your name is: " );
float ID= Float.parseFloat(JOptionPane.showInputDialog("Your ID is:"));
e.setName(name);
e.setID(ID);
block1: {
if(ID < 999999999){
JOptionPane.showMessageDialog(null,"Wrong ID ");
break block1;}

int n = JOptionPane.showConfirmDialog(
null,
"Have you treated before?",
"An Inane Question",
JOptionPane.YES_NO_OPTION);

if(n == JOptionPane.YES_OPTION){
String f = JOptionPane.showInputDialog("When did you treat? :");
JOptionPane.showMessageDialog(null,"you treated at "+f);}
//String g=JOptionPane.showInputDialog("which clinic did you go?:");
//JOptionPane.showMessageDialog(null," you went to the "+g);

else {
int reply = JOptionPane.showConfirmDialog(
null,
"Have you used drug recently?",
"An Inane Question",
JOptionPane.YES_NO_OPTION);
if(reply== JOptionPane.YES_OPTION){
String b = JOptionPane.showInputDialog("Which drugs have you used:");
JOptionPane.showMessageDialog(null,b);}
if(reply== JOptionPane.NO_OPTION){
int a = JOptionPane.showConfirmDialog(
null,
"Do the patients have any alergy?",
"An Inane Question",
JOptionPane.YES_NO_OPTION);
if(a== JOptionPane.YES_OPTION){
String c = JOptionPane.showInputDialog("What allergy:");
JOptionPane.showMessageDialog(null,"you have a "+c+"alergy.");}
if(a== JOptionPane.NO_OPTION){
Object[] selectionValues = { "A RH+", "A RH-", "0 RH+", "0 RH-", "B RH+", "B RH-", "AB RH+","AB Rh-" };
String initialSelection = "A RH+";
Object selection = JOptionPane.showInputDialog(null, "The patients’ blood group.",
"blood group", JOptionPane.QUESTION_MESSAGE, null, selectionValues, initialSelection);
JOptionPane.showMessageDialog(null,selection);
JOptionPane.showMessageDialog(null, "You can do threatment!");
DateFormat dateFormat= new SimpleDateFormat("dd/MM/yyyy");

Calendar cj = Calendar.getInstance();
cj.add(Calendar.DATE, 5);
JOptionPane.showMessageDialog(null,"You can come to treatment at " +dateFormat.format(cj.getTime()));}}


}
//JOptionPane.showMessageDialog(null,"your name is:"+name);
//JOptionPane.showMessageDialog(null,"your ID is:"+ID);
//JOptionPane.showMessageDialog(null,"you have a"+c+"alergy");
//JOptionPane.showMessageDialog(null, "your blood group is:"+selection);
//JOptionPane.showMessageDialog(null,"you can take the treatment at" +dateFormat.format(cj.getTime()));


System.exit(0); }
}}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.