You are on page 1of 23

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

VIVEKANAND EDUCATION SOCIETY’s


POLYTECHNIC

MICRO PROJECT
Academic year: 2020-21

Title: Calendar Application in C._

Program: Instrumentation Engineering


Program code: IS3I
Course: Programming in ‘C’ (PIC)
Course code: 22026

(i)
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to certify that Mr. Sahil J., Kapil T. , Abhishek D. Roll No. 22-24 of Third (III)
Semester of Diploma in Instrumentation, Of Institute, V.E.S. POLYTECHNIC (Code:
0004) has Completed the Micro Project satisfactorily in Subject- Programming in
‘C’ (PIC)for the academic year 2020 - 2021 as prescribed in the curriculum.

Place: Mumbai Enrollment No:1900040014-16

Date: …02…/…02…/2021 Exam Seat No: ………………………

Subject Teacher Head of the Department Principal

Seal of Institution
(ii)
Group Details:

Sr. Name of group members Roll Enrollment No. Seat No.


No. No.
1 Sahil Jadhav 22 1900040014
2 Kapil T. 23 1900040015
3 Abhishek D. 24 1900040016

Name of Guide: Mr. Kalpesh bagal

(iii)
INDEX

Academic year: 2020-21 Name of the faculty: Mrs. Mr. Kalpesh bagal

Program code: IS3I Course & Course code: Programming in ‘C’


(PIC)( 22026)
Roll No.22-24 Enrollment No. 1900040014-16

Semester: 3rd Name of the Candidate: Sahil J. , Kapil T. ,Abhishek D.

SR.
CONTENT PAGE NO.
NO.
Micro-Project Proposal
a) Aims/Benefits
b) Course Outcomes Addressed
1 c) Proposed Methodology
d) Action Plan
e) Resources Required

2 Rationale

3 Course Outcomes Achieved

4 Literature Review

5 Actual Methodology Followed

6 Actual Resources Used

7 Outputs of the Microproject

8 Skills Developed / learning outcome

9 Applications of this Project

10 Teacher Evaluation Sheet


Annexure - I

Micro - Project Proposal


Calendar Application in C._
a. Aim of the Micro-Project (30-50 words)
This Micro project “Calendar Application” is a simple project built in C. This project has following features.
1. It displays a nicely formatted calendar of every month.
2. You can find the day by entering the day, month and year. For example, if you enter day =10,
month = 03 and year = 1991, it gives you the day ‘Sunday’.
3. You can add the note for a particular day.
4. If the given month has a note in it, it will display || in that day.
b. Course Outcomes Addressed:
CO1: Write simple 'C' programs using arithmetic
expressions. CO2: Use control structures in 'C'
program.
CO4: Develop 'C' programs using functions for modular programming approach.
CO5: Develop 'C' programs using structure and union.

c. Proposed Methodology
 Discussion of the online topic with group members.

 Literature Survey.

 Submission of project proposal.

 Collection of information.

 Analysis of Data.

 Draft the information into relatable format.

 Finalize the case study.

 Report presentation
d. Action Plan:

Planned Planned Name of


Sr. Start date Finish Responsible
Week Activity to be performed
no.
date Team

1 1st Discussion and finalization of topic 18-09-2020 25-09-2020 All Members

2 2nd Preparation and submission of Project 25-09-2020 09-10-2020 All Members


Proposal

3 4th Literature Review and collection of 09-10-2020 23-10-2020 All Members


data
4 6th Developing the circuit/ Program 23-10-2020 11-12-2020 All Members

5 9th Testing the circuit/ Program 11-12-2021 15-01-2021 All Members

8 13th Compilation of Report 15-01-2021 22-01-2021 All Members

9 15th Actual Presentation & Final 22-01-2021 29-01-2021 All Members


submission of Micro Project

e. Resources Required :

Sr. Name of the Resource/Material Specifications


No

1 Hardware:- Computer System Computer with 8GB ram


2 Software Turbo C /C++
3 Operating system Window 10
4 Internet Connection To surf websites for
information related to
topics

Name of Team Members with Roll Nos Signature of Teacher


Sahil J. (22)

Kapil T.(22)

Abhishek D. (24)
Annexure – II

Micro - Project Report


Calendar Application in C.
1. Rationale : (Importance of the project, 30-50 words)
The electrical and electronics related specialized branches deal with microcontrollers and
embedded systems, in many applications. To interface with such devices, knowledge of
programming language is required. The 'C' language is very helpful to develop and enhance
skills of programming. 'C' is used to develop device drivers, operating systems, system software
and applications. This course will enable students to learn developing programming logic as well
as debug, compile and execute 'C' program on different operating systems.
Basically three operations can be done in this calendar application. To find out the day
corresponding to a given date, the date, month and year are asked. You can list the
days and dates of any month of any year.
2. Aim/Benefits of the micro project:

This Micro project “Calendar Application” is a simple project built in C. This project has
following features.
1. It displays a nicely formatted calendar of every month.
2. You can find the day by entering the day, month and year. For example, ifyou
enter day = 10, month = 03 and year = 1991, it gives you the day ‘Sunday’.
3. You can add the note for a particular day.
4. If the given month has a note in it, it will display || in that day.

3. Course outcomes achieved:


CO1: Write simple 'C' programs using arithmetic
expressions. CO2: Use control structures in 'C'
program.
CO4: Develop 'C' programs using functions for modular programmingapproach.
CO5: Develop 'C' programs using structure and union.

4. Literature Review:

1. List some reference books name:- 1.The C Programming Language” by Brian W


Kernighan / Dennis Ritchie

2. “Let Us C” by Yashavant Kanetkar

3. “Programming in C” by Reema Thareja

4. “Computer Basics and C Programming” by Rajaraman V.


some website name:-

www.codewithc.com

https://en.m.wikipedia.org

www.codeproject.com

www.google.com
5. Actual methodology followed (Step wise work done, data collected, contribution
of individual member)1. Create an xml for weeks.
2. Initialize days and weeks.
3. Create parameter for days butbutto
4. Create each days and add days in weeks.
5. Get values from android’s calendar instance.
6. Let’s add numbers in days.
Adding numbers of current months. , Adding previous month
numbers., Adding next month numbers. ,

2. Do stuff on day click Listener.

C –Program
#include <stdio.h>
#include <stdlib.h>

int isLeapYear( int year ); /* True if leap year */


int leapYears( int year ); /* The number of leap year */
int todayOf( int y, int m, int d); /* The number of days since the beginning of the year */
long days( int y, int m, int d); /* Total number of days */
void calendar(int y, int m); /* display calendar at m y
*/ int getDayNumber(int d,int m,int y);
char *getName(int day);

// Copied from
// https://stackoverflow.com/questions/35103745/read-a-string-as-an-input-using-scanf
void flush()
{
int c;
while ((c = getchar()) != '\n' && c != EOF);
}

typedef struct {
int day;
int month;
int year;
char note[255];
} Note;

int main(int argc, char* argv[]){


int year,month, day;
char choice;
Note note;
FILE *fp;
fp = fopen("note.bin", "r");
if (fp == NULL) {
fp = fopen("note.bin", "w");
}
fclose(fp);

while(1) {
printf("1. Find the day\n");
printf("2. Print calendar of a month\n");
printf("3. Add Note\n");
printf("4. Exit\n");
printf("Enter your choice: ");
scanf("\n%c", &choice);
switch(choice) {
case '1':
printf("Enter the day, month and year: ");
scanf("%d %d %d", &day, &month, &year);
printf("The day is : %s\n", getName(getDayNumber(day, month, year)));
break;
case '2':
printf("Enter the month and year: ");
scanf("%d %d", &month, &year);
printf("Please enter 's' to see the notes\n Press any other key to continue\n");
calendar(year, month);
break;
case '3':
printf("Enter the day, month and year: ");
scanf("%d %d %d", &note.day, &note.month, &note.year);
flush();
printf("Enter the note: ");
fgets(note.note, 255, stdin);
fp = fopen("note.bin", "a+");
if (fp == NULL) {
printf("File note.bin can not be opened\n");
exit(1);
}
fwrite(&note, sizeof(Note), 1, fp);
printf("Note added sucessfully\n");
fclose(fp);
break;
case '4':
printf("Bye!!");
exit(0);
break;
default:
printf("Not a valid option\n");
break;
}
}
return 0;
}

int isLeapYear( int y ){


return(y % 400 == 0) || ((y % 4 == 0) && (y % 100 != 0));
}

int leapYears( int y ){


return y/4 - y/100 + y/400;
}

int todayOf( int y, int m, int d) {


static int DayOfMonth[] =
{ -1,0,31,59,90,120,151,181,212,243,273,304,334};
return DayOfMonth[m] + d + ((m>2 && isLeapYear(y))? 1 : 0);
}

long days( int y, int m, int d){


int lastYear;
lastYear = y - 1;
return 365L * lastYear + leapYears(lastYear) + todayOf(y,m,d);
}

void calendar(int y, int m)


{ FILE *fp;
Note* notes, note;
int len, j, hasNote =
0;
char choice;
const char *NameOfMonth[] = { NULL/*dummp*/,
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
};
char Week[] = "Su Mo Tu We Th Fr Sa";
int DayOfMonth[] =
{ -1,31,28,31,30,31,30,31,31,30,31,30,31 };
int weekOfTopDay;
int i,day;

weekOfTopDay = days(y, m, 1) % 7;

fp = fopen("note.bin", "rb");
if (fp == NULL) {
printf("Couldn't read notes\n");
}
len = 0;
while(fread(&note, sizeof(Note), 1, fp))
{ if (note.year == y && note.month ==
m) { len++;
}
}
rewind(fp);
j = 0;
notes = (Note*) malloc (sizeof(Note) * len);
while(fread(&note, sizeof(Note), 1, fp)) {
if (note.year == y && note.month == m) {
notes[j] = note;
j++;
}
}

fclose(fp);

if(isLeapYear(y))
DayOfMonth[2] = 29;
printf("\n %s %d\n%s\n", NameOfMonth[m], y, Week);
for(i=0;i<weekOfTopDay;i++)
printf(" ");
for(i=weekOfTopDay,day=1;day <= DayOfMonth[m];i++,day++){
hasNote = 0;
for (j = 0; j < len; j++) {
if (notes[j].day == day) {
printf("|%2d| ",day);
hasNote = 1;
break;
}
}
if (hasNote == 0)
{ printf("%2d
",day);
}
if(i % 7 == 6)
printf("\n");
}
printf("\n"); scanf("\n
%c", &choice); if
(choice == 's') {
printf("Here are list of notes for %d %d\n", m, y);
for (j = 0; j < len; j++) {
printf("%d: %s\n", notes[j].day, notes[j].note);
}
} else
{ retur
n;
}
}

int getDayNumber(int d, int m, int y){ //retuns the day number


static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
y -= m < 3;
return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7;
}

char *getName(int day){ //returns the name of the day


switch(day){
case 0 :return("Sunday");
case 1 :return("Monday");
case 2 :return("Tuesday");
case 3 :return("Wednesday");
case 4 :return("Thursday");
case 5 :return("Friday");
case 6 :return("Saturday");
default:return("Error: Invalid Argument Passed");
}
}

6. Actual resources used

Sr. Name of the Resource/Material Specifications


No

1 Hardware:- Computer System Computer with 8GB


Ram
2 Software Turbo C /C++
3 Operating system Window 10
4 Internet Connection To surf websites for
information related to
topics.
7. Output of the micro project : (Write the output observed and paste a picture also)

8. Skills developed/Learning outcome

 Designing: Designing of micro project with minimum


required resourcesand at low cost.
 Teamwork: Learned to work in a team and boost individual confidence.
 Time Management: Timely completion of micro project as scheduled.
 Data Analysis: Interpretation of data: drawing and analysis of
graphs, laboratory calculations, etc.
 Problem-solving: Develop good problem-solving habits.
 Technical writing: Preparing a report of the proposed plan and
final report.
 Presentation: Giving working model presentation of the micro project.
9. Application of this Micro-Project

Basically three operations can be done in this calendar application. To


find out the day corresponding to a given date, the date, month and year
are asked. You can list the days and dates of any month of any year.

Signature of faculty
Annexure – III

Suggested Rubric for Assessment of Micro-


Project

S. Characteristic to Poor Average Good Excellent


No. be assessed ( Marks 1 - 3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )
Relevance to the Relate to very Take care of at-least Take care of more
1 Related to some LOs
course few LOs one CO than one CO
Not more than
Literature Survey two sources At-least 5 relevant
At –least 7 relevant About 10 relevant
2 /information (primary and sources, at least 2
sources, most latest sources, most latest
collection secondary), very latest
old reference
Completion of the
Completed less Completed more than
3 Target as per Completed 50 to 60% Completed 60 to 80%
than 50% 80 %
project proposal
Enough data collected
Sufficient and by sufficient and
Sample Size Sufficient and
appropriate sample, appropriate sample
small, data appropriate sample,
enough data generated size. Proper
Analysis of Data neither organized enough data generated
4 but not organized and inferences drawn by
and representation nor presented which is organized and
not presented well. No organising and
well presented well but poor
or poor inferences presenting data
inferences drawn
drawn through tables, charts
and graphs.
Well
Just Well
assembled/fabricated
assembled/fabricated assembled/fabricated
with proper
and parts are not with proper functioning
functioning parts. In
Quality of Incomplete functioning well. Not parts. In proper shape,
proper shape, within
5 Prototype/Model fabrication/assem in proper shape, within tolerance
tolerance dimensions
bly. dimensions beyond dimensions and good
and good
tolerance limit. finish/appearance. But
finish/appearance.
Appearance/finish is no creativity in design
Creativity in design
shabby. and use of material
and use of material
Very short, poor Nearly sufficient and
quality sketches, correct details about Very detailed, correct,
Detailed, correct and
Details about methods, material, clear description of
clear description of
methods, precautions and methods, materials,
methods, materials,
6 Report Preparation material, conclusion. but clarity precautions and
precautions and
precaution and is not there in conclusions. Enough
Conclusions. Sufficient
conclusions presentation. But not tables, charts and
Graphic Description.
omitted, some enough graphic sketches
details are wrong description.
Major
information is Includes major Includes major Well organized,
not included, information but not information and well includes major
7 Presentation
information is well organized and organized but not information ,well
not well not presented well presented well presented
organized .
Could not reply Replied to
Replied properly to
to considerable considerable number Replied most of the
8 Viva considerable number of
number of of questions but not questions properly
question.
question. very properly
Annexure – IV

Teacher Evaluation Sheet

Name of Student:Sahil J. , Kapil T., Abhishek D. Enrollment No. 1900040914-16


Name of Program: IS3I Semester:III
Course Title: Programming in ‘C’ (PIC) Course Code: 22026

Title of the Micro-Project:. Calendar Application in C.


Course Outcomes Achieved – CO1: Write simple 'C' programs using arithmetic expressions. CO2:
Use control structures in 'C' program.
CO4: Develop 'C' programs using functions for modular programming approach.
CO5: Develop 'C' programs using structure and union.
Evaluation as per Suggested Rubric for Assessment of Micro Project
Sr. Characteristic to be
Poor Average Good Excellent
No. assessed ( Marks 1-3 ) (Marks 4-5 ) (Marks 6-8) ( Marks 9-10)
Sub total

Process and product Assessment (6m)

Relevance to the course


1

Literature Survey /
2 Information Collection

Completion of the Target


3 as per project proposal

Analysis of Data and


4
representation
Report Preparation
6
In

Individual Presentation/Viva (4 marks)

Presentation
7
Viva
8
Micro-Project Evaluation Sheet
Part A -Process and
Part B -individual Total Marks
Roll No. Name product Assessment
Presentation/Viva (4m) 10
(6m)
22 Sahil J.
23 Kapil T.
24 Abhishek D.

Note:
Every course teacher is expected to assign marks for group evolution in first 3 columns & individual
evaluation in 4TH columns for each group of students as per rubrics.

Comments/Suggestions about teamwork/leadership/interpersonal communication (if any)


………………………………………………………………………………………………
……………………………………………………………………………………………..
……………………………………………………………………………………………..
……………………………………………………………………………………………..

Any Other Comment:


……………………………………………………………………………………………
……………………………………………………………………………………………
……………………………………………………………………………………………
………………………………………………………………………………………………

Name and designation of the Faculty Member: Mrs. Kalpesh bagal

Signature

You might also like