Problem Statement 1: Hospital Beds Shortage during Corona
Corona has affected human life, and changed things drastically. There is a shortage of
hospital beds in these tough times. Being a programmer in beingartifex, you have
thought to overcome this issue, so that people will not have to rush to different hospitals
to get a bed for their loved ones.
In a village named artifexnagar, there are 10 hospitals named A, B, C, D, E, F, G, H, I, J.
Each hospital has 100 beds. Initially, all beds are vacant(there is no patient on any bed).
Now, a person can either book a bed for him, or he/she can be discharged from there.
If a person is discharged from a bed, then that bed is vacant and can be booked again.
For free beds :
A person can enter two data “freebeds” and hospital name, and the bed number of all
beds that are free in that hospital hospital will be displayed.
Bed number will start from 1 and go upto 100 (1, 2, 3, 4 … 100).
A person can book a bed by entering “book” and entering four details of him/her that is
name(one worded), phone number , age and a password . And two more details that is
hospital name and bed number, if that bed is free (that is not previously booked by any
patient , or the patient has been discharged from that bed) , the bed will be booked ,
otherwise a message will display “ bed is already booked”.
For discharge:
A person can discharge from a hospital by entering “discharge” and 3 details, password,
hospital name and bed number. If all the details are genuine, he’ll be discharged , and
that bed of the hospital is again ready to book.
A person can enter “OK” to get out of your program , and you’ll display a message
“thanks for using beingartifex corona management system”.
Example:
book Aniket 9192939495 20 mysecurebed C 3
book Pranamika 9495969792 19 letmecure J 10
book Akash 9342634425 19 coronawin A 20
book Alok 9134955664 19 coronaishell C 13
book Shashvat 9758474744 18 coronalose E 7
book Aman 9846983743 19 coronahell F 10
book Nitik 9134995664 18 coronais G 4
Freebeds C
1 2 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
99 100 (instruction-> This is your output where all the free beds in hospital C are being displayed.
Where bed 3 and 13 are booked , so it’s being displayed).
discharge mysecurebed 3 C
Freebeds C
1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
99 100
(as bed 3 is being discharged by aniket, it’s free to book now, but bed 13 in hospital C is still
occupied by Alok).
OK
thanks for using beingartifex corona management system
Problem Statement 2: Hotel Rooms Booking Issue
During these tough times, the Artifex Hotel in ArtifexNagar saw a spike in the number of guests.
Mr. Bansal, the manager of the hotel, saw that the staff is facing some issue in the allotment of
hotel rooms, and tables of the restaurants. Being a programmer, Mr. Aman wants you to solve the
issue by writing a programme that allots rooms and tables to the guests of the hotel.
Now, a guest can either check in the hotel room or checkout. If a guest checks out of a
room, then that room is vacant and can be booked again. While check-in, a guest
provides four pieces of information - His/Her name, Date of birth(dd/mm/yy), Phone no
and sets a Password for himself, all separated by a space.
For allotting a room no. :
A person can enter a data “free_room” “floor_number”, and the room number of all
rooms that are free on that floor will be displayed. There are 5 floors each having 100
rooms.
A person can book a room by entering “book” and entering four details of him/her that is
name(one worded), phone number , age and a password.
Room No. format R_floorno._roomno.
For allotting a table no. :
A guest enters a keyword “table” and room number which is allotted while check-in and
the table no. is allotted.
For check out:
A person can check-out from the hotel by entering “check” and 3 details, password, floor
no. and room no.. If all the details are genuine, he can check out , and that room of the
hotel is again ready to book.
A person can enter “OK” to get out of your program , and you’ll display a message
“thanks for using being artifex hotel management system”.
Example:
Input example:
free_room1
book Aniket 9192939495 02/01/2001 mysecurebed
Allotted room : R_1_1
table R_1_1
free_room2
book Shashvat 9495969792 03/01/2001 letmecure
Allotted room : R_2_100
table R_2_100
free_room3
book Aman 9342634425 04/01/2001 coronawin
Allotted room : R_3_50
table R_3_50
free_room4
book Alok 9134955664 01/01/2001 coronaishell
Allotted room : R_4_35
table R_4_35
free_room5
Book Nitik 919413768570 09/10/2000 18 secureshield
Allotted room : R_5_16
table R_5_16
Problem Statement 3: School Addmissions Issue during Corona
Corona has affected human life, and changed things drastically. To maintain social
distancing and reduce the possibility of covid-19 spread during admission in school. you
have thought to find a solution, so that people will find that if the school has available
vacancy for the student admissions.
In a village named Artifexnagar, there are 10 schools for classes I-X named A, B, C, D,
E, F, G, H, I, J.
School details
Each school has 100 admission capacity, (per class-10 students) and any student can
take admission at any time. Initially, there is 0 admission in a school.
Now, a person can either get admission for him, or he/she can leave(Transfer,etc) from a
class. If a person leaves a school, then 1 vacancy will be created and can be booked
again.
A person can enter two data “Vac_adm” and school name with a class number and roll
number (Vac_adm A X), and the number of admission vacancies of a particular class
with roll number(from 1-10) will be displayed.
Class number will start from I and go upto X (I, II,III, … X)
Admission procedure
A person can book admission by entering “adm” and entering four details of his/her
name(one worded), phone number , age and a password . And three more details, that
is school name and class number with roll number, if that place is available (that is not
previously booked by any student, or the student has left from that class), the place will
be booked, otherwise a message will display “ Admission is already done”.
Leaving procedure
A person can leave a school by entering “leave” and 5 details, password, school name,
class, and roll number. If all the details are genuine, he can leave , and that place of the
school is again ready to book and if the details are not genuine then a message pops up
“invalid details entered”
A person can enter “OK” to get out of your program , and you’ll display a message
“thanks for using beingartifex school management system”.
Example:
adm Aniket 9192939495 20 mysecurebed C II 5
adm Nitik 919413768570 18 secureshield A III 7
adm Pranamika 9495969792 19 letmecure J V 9
adm Akash 9342634425 19 coronawin A X 4
adm Alok 9134955664 19 coronaishell C IX 10
Vac_adm C X
1 2 4 5 6 7 8 (instruction-> This is your output where all the free beds in school C and
class X are being displayed. Where roll number 3,9 and 10 are booked , so it’s not being
displayed).
leave secureshield C X 4
Vac_adm C X
1 2 5 6 7 8 (instruction-> This is your output where all the free beds in school C and
class X are being displayed. Where roll number 3 and 9 are booked , so it’s not being
displayed).
(as roll number 4 is being left by Nitik, it’s free to book now, but bed 9 and 10 in school C
is still occupied).