To Display The Total No of Rooms and Faculty Who Are Free in Your Dept. in A Specific Day
To Display The Total No of Rooms and Faculty Who Are Free in Your Dept. in A Specific Day
“To display the total no of rooms and faculty who are free in your
dept. in a specific day.”
By,
Submitted to,
1
CONTENTS
1. Introduction………………………………………………..Pg3
5. References (10)…………………………………………….Pg14
2
INTRODUCTION
Life is all about problems and solving them. Be it teachers, students or anybody,
we are surrounded with them and are constantly working to find solutions and
It’s always been a problem for exam coordinators and teachers to find empty
Classrooms and faculty to conduct various test and quizzes at the same time.
The exam coordinators have to spend a lot of time in searching free slots for
the same. Even for an activity to be held in any of the department, classes have
have written a program to give an easy and fast solution to this major trouble.
3
Problem Solving Design
display which are all the empty classrooms available in your department
considering the time table allocation and the total no of rooms and faculty who
To solve this very lively real world problem we used the skills that we acquired
during the course “Programming in C”. We have extensively used the advanced
handling. As the user don’t have to enter any data, we have manually inserted
all the data using the timetable of different classes and room number.
Lastly for the comfortably of user we have displayed the data in a well structure
manner using loops. The user can easily identify which room is empty at what
4
Implementation of the problem
#include <stdio.h>
#include <string.h>
struct ClassRoom {
int Room_No;
char Dept[20];
char Free_time_Monday[MAX];
char Free_time_Tuesday[MAX];
char Free_time_Wednesday[MAX];
char Free_time_Thursday[MAX];
char Free_time_Friday[MAX];
char Free_time_Saturday[MAX];
};
void Display();
void DataInput();
int main()
DataInput();
Display();
return 0;
5
void DataInput()
Class[0].Room_No = 201;
Class[1].Room_No = 101;
Class[2].Room_No = 102;
6
strcpy(Class[2].Free_time_Thursday, "11:30 to 12:00, 2:00 to 2:45");
void Display()
int i,j;
printf("Day\t\t");
printf("Room No\t\t");
printf("Department Name\t\t\t");
printf("Free Time\n\n");
for(i=0;i<6;i++)
switch((i+1))
case 1:
printf("Monday\t\t");
for(j=0;j<3;j++)
if(j<1)
printf("%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Monday);
else
7
{
printf("\t\t%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Monday);
putchar('\n');
break;
case 2:
printf("Tuesday\t\t");
for(j=0;j<3;j++)
if(j<1)
printf("%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Tuesday);
else
printf("\t\t%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Tuesday);
putchar('\n');
break;
8
case 3:
printf("Wednesday\t");
for(j=0;j<3;j++)
if(j<1)
printf("%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Wednesday);
else
printf("\t\t%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Wednesday);
putchar('\n');
break;
case 4:
printf("Thrusday\t");
for(j=0;j<3;j++)
if(j<1)
printf("%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
9
printf("%s\n", Class[j].Free_time_Thursday);
else
printf("\t\t%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Thursday);
putchar('\n');
break;
case 5:
printf("Friday\t\t");
for(j=0;j<3;j++)
if(j<1)
printf("%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Friday);
else
printf("\t\t%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Friday);
10
}
putchar('\n');
break;
case 6:
printf("Saturday\t");
for(j=0;j<3;j++)
if(j<1)
printf("%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Saturday);
else
printf("\t\t%d\t\t", Class[j].Room_No);
printf("%s\t\t\t", Class[j].Dept);
printf("%s\n", Class[j].Free_time_Saturday);
putchar('\n');
break;
default:
break;
11
Output-
Monday 201 TE (1st Year) 11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45
101 TE (2nd Year) 11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45
102 TE (3rd Year) 11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45
Wednesday 201 TE (1st Year) 11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45
101 TE (2nd Year) 11:30 to 12:00, 2:00 to 2:45
102 TE (3rd Year) 11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45
12
Conclusion
Every part of our daily life is related to technology in one or the other way.
Technology have a huge impact on our lives making life simpler and better. In
this era of modernization, computers with proper programming can process
data and convert them to logical conclusions, classify them and make them
readily available for use.
The designing of a program to display the total no. of free slots and faculty in
our department to enable the smooth conduction of different activities and tests,
does good to many. This report gives our experiences in designing and
implementation of the problem. We hereby present an analysis and design of a
set of readable data to make out the relative information about free slots
available in a department at any particular day. After identifying the project
output, it reveals that the successful implementation of this give problem has
At last we would like to thank our Course teacher, Dr. G.S. Mamatha, for giving
us the opportunity to solve this daily life problem and for the kind help given in
13
References
Programming in ANSI C: E Balaguruswamy
Let us C: Yashavant P. Kanetkar
14