0% found this document useful (0 votes)
48 views

To Display The Total No of Rooms and Faculty Who Are Free in Your Dept. in A Specific Day

The document is a programming assignment report submitted by three students to their professor. It details the implementation of a program to display the empty classrooms and free faculty in a department on a given day. The program uses structures and arrays to store timetable data for three classrooms. It then displays this data by day of the week, listing the room number, department, and free periods for each classroom.

Uploaded by

Sumit Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

To Display The Total No of Rooms and Faculty Who Are Free in Your Dept. in A Specific Day

The document is a programming assignment report submitted by three students to their professor. It details the implementation of a program to display the empty classrooms and free faculty in a department on a given day. The program uses structures and arrays to store timetable data for three classrooms. It then displays this data by day of the week, listing the room number, department, and free periods for each classroom.

Uploaded by

Sumit Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Department of Information Science & Engineering

R.V. College of Engineering, Bengaluru -560059.


(An Autonomous Institution Affiliated to VTU, Belgaum)

A Programming in C Assignment Report on

“To display the total no of rooms and faculty who are free in your
dept. in a specific day.”

By,

Nikhil Prakash USN 1RV16TE0


Sumit Kumar USN 1RV16TE053
Rahul R. Sherekar USN 1RV16TE035

Submitted to,

Dr. G.S. Mamatha


Associate Professor,
Dept. of ISE, RVCE.

In the partial fulfillment for,

2nd Semester Bachelor of Engineering Degree

1
CONTENTS

1. Introduction………………………………………………..Pg3

2. Problem Solution Design………………………………......Pg4

3. Implementation of the problem…………………………...Pg5

4. Results and Conclusions……………………………….....Pg13

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

make the place around, a better place to live.

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

to be shifted causing major headache to teachers. With this problem in head we

have written a program to give an easy and fast solution to this major trouble.

3
Problem Solving Design

The problem, which is given to us in this assignment, is “Write a program to

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

are free in each dept. in a specific day.”

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

concepts like Structures, Array, Loops etc. in this program.

We have implemented a mini Database program where we stored our data in

Structure because of its heterogeneous characteristics and efficient data

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

time and on which day of the week.

4
Implementation of the problem

#include <stdio.h>

#include <string.h>

#define MAX 100

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];

};

struct ClassRoom Class[MAX];

void Display();

void DataInput();

int main()

DataInput();

Display();

return 0;

5
void DataInput()

Class[0].Room_No = 201;

strcpy(Class[0].Dept,"TE (1st Year)");

strcpy(Class[0].Free_time_Monday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[0].Free_time_Tuesday, "11:00 to 11:30, 2:00 to 2:45");

strcpy(Class[0].Free_time_Wednesday, "11:00 to 11:30,1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[0].Free_time_Thursday, "11:00 to 11:30, 2:00 to 2:45");

strcpy(Class[0].Free_time_Friday, "11:00 to 11:30, 2:00 to 2:45");

strcpy(Class[0].Free_time_Saturday, "9:00 to 4:45");

Class[1].Room_No = 101;

strcpy(Class[1].Dept,"TE (2nd Year)");

strcpy(Class[1].Free_time_Monday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[1].Free_time_Tuesday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[1].Free_time_Wednesday, "11:30 to 12:00, 2:00 to 2:45");

strcpy(Class[1].Free_time_Thursday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[1].Free_time_Friday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[1].Free_time_Saturday, "11:00 to 11:30, 1:30 to 2:15");

Class[2].Room_No = 102;

strcpy(Class[2].Dept,"TE (3rd Year)");

strcpy(Class[2].Free_time_Monday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[2].Free_time_Tuesday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[2].Free_time_Wednesday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

6
strcpy(Class[2].Free_time_Thursday, "11:30 to 12:00, 2:00 to 2:45");

strcpy(Class[2].Free_time_Friday, "11:00 to 11:30, 1:30 to 2:15, 4:15 to 4:45");

strcpy(Class[2].Free_time_Saturday, "11:00 to 11:30");

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-

Day Room No Department Name Free Time

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

Tuesday 201 TE (1st Year) 11:00 to 11:30, 2:00 to 2: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

Thursday 201 TE (1st Year) 11:00 to 11:30, 2:00 to 2: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:30 to 12:00, 2:00 to 2:45

Friday 201 TE (1st Year) 11:00 to 11:30, 2:00 to 2: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

Saturday 201 TE (1st Year) 9:00 to 4:45


101 TE (2nd Year) 11:00 to 11:30, 1:30 to 2:15
102 TE (3rd Year) 11:00 to 11:30

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

background, problem statement, objectives, scope, justification and expected

output, it reveals that the successful implementation of this give problem has

resulted in a more effective way of carrying out different activities in an

department without any hectic preplanning.

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

every aspect of project.

13
References
 Programming in ANSI C: E Balaguruswamy
 Let us C: Yashavant P. Kanetkar

14

You might also like