Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: clinic registration system

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default clinic registration system

    i need your help to solve this coding..
    i hope anyone can help me to done this project..



    import java.util.*;

    public class clinic {


    public clinic(){

    }

    public static void main(String[] args) {
    int choice;

    Scanner input = new Scanner(System.in);



    System.out.println(" SYSTEM CLINIC REGISTRATION");
    System.out.println(" 1. Admin Menu ");
    System.out.println(" 2. Doctor Menu ");
    System.out.println(" 3. Exit Menu ");

    System.out.println(" Enter your choice : ");
    choice = input.nextInt();


    if(choice == 1){

    mainMenu();
    }

    else if(choice == 2){
    doctorMenu();
    }
    else if(choice == 3){
    exit(0);
    }
    else {
    System.out.println(" Sorry, invalid data");


    }
    }

    public class admin extends clinic {


    public void mainMenu() {
    int choice;

    System.out.println(" 1. Insert Patient ");
    System.out.println(" 2. Update Patient ");
    System.out.println(" 3. search Patient ");
    System.out.println(" 4. Display Patient ");
    System.out.println(" 5. Remove Patient ");
    System.out.println(" 6. Exit ");

    Scanner input = new Scanner(System.in);

    System.out.println(" Enter your menu :");
    choice = input.nextInt();

    if(choice == 1){
    InsertPatient();

    }
    else if(choice == 2){
    UpdatePatient();
    }
    else if( choice == 3){
    RemovePatient();
    }

    else if(choice == 4){
    SearchPatient();

    }

    else if(choice == 5){
    Display();
    }
    else
    System.out.println("Sorry, Invalid Data");
    }



    public void InsertPatient (){

    String name, address, date,id;
    int phoneNo;

    Scanner input = new Scanner(System.in);

    System.out.println("\t PATIENT RECORD ");
    System.out.println("-----------------------------");

    System.out.println("Enter patient name :");
    name = input.next();
    System.out.println(" Enter patient id :");
    id = input.next();
    System.out.println(" Enter patient address :");
    address = input.next();
    System.out.println(" Enter patient Phone Number :");
    phoneNo = input.nextInt();

    System.out.println(" Enter patient date visiting :");
    date = input.next();

    }

    public void UpdatePatient(){

    String id, date, input;
    int phoneNo;

    Scanner input = new Scanner(System.in);

    System.out.println(" ** Update patient data** ");
    System.out.println("------------------------------- ");
    System.out.println(" Enter patient id:");
    id = input.next();

    if (input == id){

    System.out.println(" Phone Number :");
    phoneNo = input.nextInt();
    System.out.println(" visiting date (DDMMYY) :" );
    date = input.next();
    }
    else
    {
    System.out.println(" sorry, data not found! ");

    }
    }


    public void SearchPatient(){

    }




    public void RemovePatient( ){

    do{
    char answer;

    Scanner input = new Scanner(System.in);

    System.out.println(" ** DELETE PATIENT ** ");
    System.out.println(" ");
    System.out.println(" Do you want remove the data ?");
    System.out.println(" Y = Yes or N = No ");
    answer = input.next();

    if (answer == 'y' || answer == 'Y')
    {

    name=0;
    id=0;
    address=0;
    phoneNo=0;
    date=0;

    System.out.println(" Your data has been deleted ");
    }
    else{

    System.out.println(" Sorry, Data not in the list");


    }


    } while(answer=='n' ||answer=='N');
    }



    public void Display(){

    String name ,address ,id,date ;
    int phoneNo;

    System.out.println("****************************** *****");
    System.out.println(" PATIENT INFORMATION ");
    System.out.println("****************************** *****");
    System.out.println(" Patient name :" + name);
    System.out.println(" Patient Id :" + id);
    System.out.println(" Patient Addres :" + address);
    System.out.println(" Patient Phone Number :" + phoneNo);
    System.out.println(" Patient Date Visiting:" + date);


    }

    }

    public class doctor extends clinic {

    public void doctorMenu (){
    int choice;

    Scanner input = new Scanner(System.in);

    System.out.println(" -- DOCTOR MENU -- ");
    System.out.println(" 1. UPDATE PATIENT ");
    System.out.println(" 2. SEARCH PATIENT ");
    System.out.println(" 3. EXIT ");


    System.out.println(" Enter your choice :");
    choice=input.nextInt();

    switch(choice){
    case 1 :
    UpdatePatient();
    break;
    case 2 :
    SearchPatient();
    break;
    case 3 :
    mainMenu();

    default :

    System.out.println(" invalid insertion ");
    break;


    public void UpdatePatient(){

    int phoneNo;
    String id;

    Scanner input = new Scanner(System.in);

    System.out.println(" ** Update patient data** ");
    System.out.println(" ");
    System.out.println(" Enter patient id:");
    id = input.next();


    System.out.println(" Phone Number :" + phoneNo);
    phoneNo = input.nextInt();
    }

    public void SearchPatient(){

    String id, address, phoneNo, name, input;

    Scanner input = new Scanner(System.in);

    System.out.println(" Enter patient id:");
    id = input.next();

    if (input = id){


    System.out.println(" Name :" + name);
    System.out.println(" Id :" + id);
    System.out.println(" Address :" + address);
    System.out.println(" Phone No:" + phoneNo);

    }
    else {


    System.out.println(" invalid data");
    }



    }



    }
    }


  2. #2
    Member
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    70
    My Mood
    Cool
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Re: clinic registration system

    Post the code with proper highlighted and also explain what exactly is the problem that you face.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: clinic registration system

    Welcome to the forum. You can learn how to post code correctly and find other useful tips for newcomers by reading this topic.

  4. #4
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: clinic registration system

    the problem is i don't know how to create full coding clinic registration system in java using eclipes
    i hope you can help me create full coding or if you have example whatever system you have. thanks

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: clinic registration system

    Do you have any specific questions about the problems you are having with the project?

    Please edit your post and wrap your code with code tags:
    [code=java]
    YOUR CODE HERE
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. registration for SJCP
    By mohit surani in forum What's Wrong With My Code?
    Replies: 0
    Last Post: June 15th, 2013, 07:44 AM
  2. Registration deneid!
    By carmz in forum Totally Off Topic
    Replies: 3
    Last Post: June 10th, 2013, 10:05 AM
  3. registration with access as DB
    By ylo007 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 5th, 2013, 02:47 PM
  4. Membership registration system and email reminder to members
    By JavaClicks in forum Java Theory & Questions
    Replies: 0
    Last Post: July 16th, 2012, 09:18 AM
  5. How to write registration module
    By speedzojie in forum Java Theory & Questions
    Replies: 3
    Last Post: May 10th, 2010, 03:03 AM