Вы находитесь на странице: 1из 6

Name -- Anshika Tiwari

Class � 10th
Roll no. -- 1
Subject � Computer Application

INTERNAL EXAMINER EXTERNAL EXAMINER

----------------------------- ---------------------------

PROGRAM:

import java.util.*;
class Anshika
{

Scanner in=new Scanner(System.in);


static int numberofperson[]= new int[10];
static int numberofrooms[]= new int[10];
static int numberofdays[]= new int[10];
static String nameofcustomer[]= new String[10];
static String address[]= new String[10];
static long mobilenumber[]= new long[10];
static long adharnumber[]= new long[10];
int choice_bed=0;
int foodamt;
int stayamt;
char choice;
int famt;
double TaxonFood;
double TaxonStay;
double GSTonStay=0.0;
double GSTonFood=0.0;
double TotalSm;
double TotalFm;
double TOTAL;
double K;

void Booking ()
{
System.out.println("ENTER YOUR NAME ");
nameofcustomer[1]=in.next();
System.out.println("ENTER YOUR ADDRESS ");
address[1]=in.next();
System.out.println("ENTER YOUR ADHAAR NUMBER ");
adharnumber[1]=in.nextLong();
System.out.println("ENTER THE MOBILE NUMBER ");
mobilenumber[1]=in.nextLong();
System.out.println("ENTER NUMBER OF PERSONS ");
numberofperson[1]=in.nextInt();
System.out.println("ENTER THE NUMBER OF DAYS ");
numberofdays[1]=in.nextInt();
System.out.println("ENTER THE NUMBER OF ROOMS ");
numberofrooms[1]=in.nextInt();
System.out.println("\n");
System.out.println("==================================================");
System.out.println(" NAME- "+ nameofcustomer[1]);
System.out.println(" ADDRESS- "+address[1]);
System.out.println(" ADHAAR NUMBER- "+adharnumber[1]);
System.out.println(" MOBILE NUMBER- "+mobilenumber[1]);
System.out.println(" NUMBER OF PERSONS- "+numberofperson[1]);
System.out.println(" NUMBER OF DAYS- "+numberofdays[1]);
System.out.println(" NUMBER OF ROOMS- "+numberofrooms[1]);

System.out.println("=======================================================");
System.out.println("\n");
System.out.println("ENTER [1] FOR AC ROOMS AND [2] FOR NON-AC ROOMS");
choice=in.next().charAt(0);
switch(choice)
{
case '1':
if(choice=='1')
System.out.println("The AC ROOM Charges are:");
System.out.println(" ******For
Single Bed = Rs.2000******");
System.out.println(" ******For
Double Bed = Rs.5000******");
System.out.println("\n");
System.out.println("Press [1] for 'Single Bed' and [2] for
'Double Bed'");
choice_bed=in.nextInt();
System.out.println("**YOUR ROOM TYPE IS "+choice +" AND BED
TYP"+choice_bed+"**");

System.out.println("========================================================");
System.out.println("\n");
break;
case '2':
if(choice=='2')
System.out.println("The NON-AC ROOM Charges are:");
System.out.println("
******Single Bed = Rs.1000******");
System.out.println("
******Double Bed = Rs.3000******");
System.out.println("\n");
System.out.println("Press [1] for 'Single Bed' and [2] for
'Double Bed'");
choice_bed=in.nextInt();
System.out.println("**YOUR ROOM TYPE IS "+choice +" AND BED
TYP"+choice_bed+"**");

System.out.println("=======================================================");
break;
default:
System.out.println("The choice was wrong");
}
}

void Bill ()
{
System.out.println("\n");
System.out.println(" PLEASE ENTER THE FOOD AMOUNT");
foodamt=in.nextInt();
System.out.println("\n");
famt=numberofrooms[1]*numberofdays[1]*foodamt;
TaxonFood=0.05*foodamt;
if(choice=='A' && choice_bed==1)
{
stayamt=numberofrooms[1]*numberofdays[1]*2000;
}
if(choice=='A' && choice_bed==2)
{
stayamt=numberofrooms[1]*numberofdays[1]*5000;
}
if(choice=='B' && choice_bed==1)
{
stayamt=numberofrooms[1]*numberofdays[1]*1000;
}
if(choice=='B' && choice_bed==2)
{
stayamt=numberofrooms[1]*numberofdays[1]*3000;
}

GSTonStay =18.0/100.0 *stayamt;


GSTonFood =5.0/100.0*foodamt;
TotalSm=GSTonStay +stayamt;
TotalFm =GSTonFood +foodamt;
{

System.out.println("=========================================================");
System.out.println("
RAJ ROYAL RESORT ");
System.out.println("
NAGPUR ");
System.out.println("
MAHARASHTRA ");
System.out.println("\n");
{
System.out.println("CUSTOMER NAME : "+nameofcustomer[1]);
System.out.println("CUSTOMER ADDRESS : "+address[1]);
System.out.println("\n");
System.out.println("Sr.No. | Description | No. Of Days|No. OF
Room | Rate | GST % |GST Amt |
Total");
System.out.println(" 1 | Stay | "+numberofdays[1]+" |
"+numberofrooms[1]+" | "+stayamt+" | 18% | "+GSTonStay+" |
"+TotalSm);
System.out.println(" 1 | food | "+numberofdays[1]+" |
"+numberofrooms[1]+" | "+foodamt+" | 5% | "+GSTonFood+" |
"+TotalFm);
K=TotalFm+TotalSm;
System.out.println("\n");
System.out.println("THE TOTAL AMOUNT TO BE
PAID ="+K);

System.out.println("====================================================");
System.out.println("\n");
}
}
}
void Report()
{
System.out.println("sl.no\tCustomer name\t\tRoom type\t\tNo.of persons");
System.out.println("\n");

System.out.println("1"+"\t"+nameofcustomer[1]+"\t"+"\t"+"\t"+choice+"\t\t\t"+number
ofperson[1]);
System.out.println("=================================================");
System.out.println("/n");
}
void Exit()
{

System.out.println("===============================================================
=="); System.out.println("GOOD BYE...HAPPPY JOURNEY AHEAD");
System.out.println("THANKYOU FOR COMING IN THIS RESORT...PLEASE VISIT AGAIN");
System.out.println("===============================================================
==");
}
}

Output:

=================================RESORT============================================
==
Enter 1 for Booking Details
Enter 2 for Bill Details
Enter 3 for Report
Enter 4 for Exit
===================================================================================
==
1
ENTER YOUR NAME
Anshika

ENTER YOUR ADDRESS


Nagpur

ENTER YOUR ADHAAR NUMBER


478975462311

ENTER THE MOBILE NUMBER


7722047160

ENTER NUMBER OF PERSONS


2

ENTER THE NUMBER OF DAYS


2

ENTER THE NUMBER OF ROOMS


2
===================================================================================
==

NAME- Anshika
ADDRESS- Nagpur
ADHAAR NUMBER- 478975462311
MOBILE NUMBER- 7722047160
NUMBER OF PERSONS- 2
NUMBER OF DAYS- 2
NUMBER OF ROOMS- 2
===================================================================================
==
ENTER [1] FOR AC ROOMS AND [2] FOR NON-AC ROOMS
1
The AC ROOM Charges are:
******For Single Bed = Rs.2000******
******For Double Bed = Rs.5000******

Press [1] for 'Single Bed' and [2] for 'Double Bed'
2
**YOUR ROOM TYPE IS 1 AND BED TYPE IS 2**
===================================================================================
==

==================================RESORT===========================================
==
Enter 1 for Booking Details
Enter 2 for Bill Details
Enter 3 for Report
Enter 4 for Exit
===================================================================================
==
2
PLEASE ENTER THE FOOD AMOUNT
500
===================================================================================
==
RAJ ROYAL RESORT
NAGPUR
MAHARASHTRA

CUSTOMER NAME: Anshika


CUSTOMER ADDRESS: Nagpur

Sr.No. | Description | No. Of Days | No. OF Room | Rate | GST % | GST Amt
| Total |
1 | Stay | 2 | 2
| 0 | 18% | 0.0 | 0.0 |
1 | food | 2 | 2 |
500 | 5% | 25.0 | 525.0 |

THE TOTAL AMOUNT TO BE PAID =525.0


===================================================================================
==
===============================RESORT==============================================
==Enter 1 for Booking Details
Enter 2 for Bill Details
Enter 3 for Report
Enter 4 for Exit
===================================================================================
==
3
sl.no | Customer name | Room type | No.of persons |
| |
| |
| |
| |
1 | Anshika | 1 | 2
|
===================================================================================
==

=============================RESORT================================================
==
Enter 1 for Booking Details
Enter 2 for Bill Details
Enter 3 for Report
Enter 4 for Exit
===================================================================================
==
4
===================================================================================
==
GOOD BYE...HAPPPY JOURNEY AHEAD
THANKYOU FOR COMING IN THIS RESORT...PLEASE VISIT AGAIN
======================================XXXXXXX======================================
==

Вам также может понравиться