0% found this document useful (0 votes)
60 views29 pages

Project Synopsis 1

This document provides a project synopsis for developing a C calendar program. It includes an acknowledgement, declaration, and certificate of originality. The objectives are to create a program that allows the user to view calendars by month/year, interpret day codes, handle leap years correctly, add/view memos, and have good error handling, modularity, comments/documentation, and a user-friendly interface. It will be developed in C++ on Windows 10 using Dev C++ and tested thoroughly.

Uploaded by

Harshit Gupta
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)
60 views29 pages

Project Synopsis 1

This document provides a project synopsis for developing a C calendar program. It includes an acknowledgement, declaration, and certificate of originality. The objectives are to create a program that allows the user to view calendars by month/year, interpret day codes, handle leap years correctly, add/view memos, and have good error handling, modularity, comments/documentation, and a user-friendly interface. It will be developed in C++ on Windows 10 using Dev C++ and tested thoroughly.

Uploaded by

Harshit Gupta
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/ 29

PROJECT SYNOPSIS

ON

C Calendar
Bachelors Of Computer Application (B.C.A)

DEPARTMENT OF COMPUTER APPLICATIONS

UTTARANCHAL SCHOOL OF COMPUTING SCIENCES

Project Mentor: Submitted By:

MR. Alok Uniyal AMAN CHAMOLI

ASSISSTANT PROFESSOR ` B.C.A. (1 SEMESTER)


ACKNOWLEDGEMENT

First and foremost, I am ever grateful to God to whom I owe my life. I would also like to
thank my parents for giving me the opportunity to study at Uttaranchal University, Dehradun.
I wish to express my deep sense of gratitude to our Project Mentor Mr. Alok Uniyal for her
valuable guidance in preparing the project and assembling the project material. I am very
thankful for her faithful blessings and for providing the necessary and related facilities
required for our computer project file. In last I also want to thank those directly or indirectly
took interest to completing my project File.

Aman Chamoli
B.C.A.(1 Semester)

ii.
DECLARATION

I hereby declare that this project work entitled “C Calendar” is an authentic record of my
work carried out at “UTTARANCHAL UNIVERSITY” under the guidance of MR. Alok
Uniyal.

Aman Chamoli

B.C.A. (1.Sem.)

ii.
CERTIFICATE OF ORIGINALITY

This is to certify that the project entitles “C Calendar” by Abhishek Bhatt has been
submitted in the partial fulfilment of the requirements for the award of the degree of BCA
from Uttaranchal University, Dehradun.

The results embodied in this project have not been submitted to any other University or
Institution for the record of any degree.

Mr. Alok Uniyal


(Project Mentor)

INDEX

ii.
S. Topics
No.
1. ACKNOWLEDGEMENT

2. DECLARATION

3. CERTIFICATE OF ORIGINALITY

4. INTRODUCTION

5. OBJECTIVES

6. SYSTEM ANALYSIS
 HARDWARE &SOFTWARE REQUIREMENT
 MODULES DESCRIPTION

7. SYSTEM ANALYSIS DESIGN

8. DATA FLOW DIAGRAM

9. FLOW CHART

10. ZELLER CONFRUENCE ALGORITHM

11. SOFTWARE TESTING

12. MODEL USED IN SOFTWARE

13. SOURCE CODE

ii.
Introduction
Calendars organize time by giving names to periods of time, such as days, weeks, months,
and years. They replicate astronomical cycles according to fixed rules.

Aim for the Project

 Allows you to see calendars by month, quarter, or year


 Help to generate the calendar of any year within a second.

OBJECTIVE

ii.
 Show Calendar:
Create a function that shows the months, days of the week, and days of the month on
a calendar for a specific year.

 Person input:
Permit the user to select a year to view the calendar for. Create a function that accepts
and verifies user input.

 Day Code Interpretation:


Create a function that determines the day code for a particular year's first of January.
This can be used to find each month's first day of the week.

 Spring Year Management:


Determine whether a given year is a leap year using reasoning, and then modify the
number of days in February accordingly.

 Memo Capabilities:
Include the ability to add and see memos for particular dates. File management can be
used to store and Retrieve by using File Handling.

 I/O File:

Provide routines that enable the user to persist their memos across program runs by
reading and writing them to a file.

 System of Menus:

ii.
Provide an easy-to-use menu structure that gives users the option to see the calendar,
create memos, or close the application.

 Error Resolution:

Ensure that the application has strong error handling throughout. Respond to
situations in which files are not able to be opened, incorrect input is entered, or other
problems arise.

 Modularity of Code:

Divide up your code into modular functions, each handling a single duty. This
improves the readability, maintainability, and reusability of the code.

 Remarks & Recordkeeping:

Add concise comments that describe each function's goal and operation, as well as
any important code parts.

 Friendly User Interface:

Create a user interface that is simple to use and comprehend, giving the user feedback
and clear instructions.

 Examining

Make that the program functions as expected by conducting extensive testing. Test for
various user interactions, edge cases, and years.

 Conventions and Code Style:

ii.
Follow standardized naming standards and code styles. Use recommended practices to
improve the readability of your code.

 Scalability

Make sure the program is designed to be easily expanded upon or altered in the future.
Think about how well it can accommodate new features or upgrades.

 Cross-Platform Harmoniousness:

Make sure your software works in a variety of contexts and operating systems.
Consider any platform-specific factors.

Hardware And Software Requirements

ii.
Software Used
Dev C++

Hardware Used

 INTEL CORE i3 OR PENTIUM.


 2 GB RAM
 SSD CAPACITY 128GB OR HDD.

PROGRAMMING LANGUAGES USED


C++ language

PLATFORM USED
Windows 10

Data Flow Diagram

ii.
 User Interface:
Accepts user input for the desired year and menu choices.
Sends user input to the Calendar Logic and Memo Logic.

 Calendar Logic:
Receives the user's entered year from the User Interface.
Calls functions to determine the day code, check for a leap year, and print the calendar.
Sends the calendar data to the User Interface for display.

 Memo Logic:
Handles the reading and writing of memos to the "memo.txt" file.
Receives memos from the User Interface for display or writing to the file.
Sends displayed memos to the User Interface.

ii.
 Input Year:
Collects the user's input for the desired year.
Sends the entered year to the Calendar Logic.

 Determine Day Code:


Takes the entered year from the Input Year process.
Calculates the day code for January 1st using a formula.
Sends the day code to the Calendar Logic.

 Determine Leap Year:


Receives the entered year from the Input Year process.
Determines if the year is a leap year and adjusts the days in February.
Sends the leap year information to the Calendar Logic.

 Display Memos:
Retrieves memos from Memo Logic.
Sends the memos to the User Interface for display.

 Add Memo:
Takes the user's entered memo from the User Interface.
Writes the memo to the "memo.txt" file using Memo Logic.

Flow Chart

ii.
Start Program

Display Instructions

User Enter Year

Calculate Day Code

Determine Leap year

Update Faburary

Display Calender

User Chooses Action

Action display Memos

Close File

End Program

 The program starts and displays instructions.


 The user enters a year.
 The user enters the month of the year to be displayed
 The calendar for the month appears
 The program ends.

ii.
Zeller Congruence Algorithm

Zeller's congruence is an algorithm devised by Christian Zeller in the 19th century to


calculate the day of the week for any Julian or Gregorian calendar date. It can be based on the
conversion between Julian day and the calendar date.

ii.
Software Testing

 White Box Testing:


Also known as clear box testing, structural testing, or glass box testing, white box
testing involves examining the internal structure of the software being tested. Testers
have access to the source code, architecture, and design of the application. The goal is
to assess how the code functions based on that knowledge. Techniques such as code
coverage analysis, path testing, and branch testing are often used in white box testing
to ensure that all paths within the code are tested thoroughly. It helps in identifying
issues like coding errors, optimization problems, and security vulnerabilities.

White box testing, also known as clear box or structural testing, involves examining the
internal logic and structure of a software application. Testers analyze the code, understand its
structure, and design test cases based on that understanding. This type of testing aims to
ensure that all paths and branches of the code are executed, and it often involves techniques
such as code coverage analysis.

Key aspects of white box testing include:

 Code Coverage:
Ensuring that all parts of the code are tested, including statements, branches, and
paths. This helps in identifying areas of the code that are not exercised during testing.

 Control Flow Testing:


Examining the flow of control through the code, ensuring that all possible control
flows are tested. This involves testing loops, decision points, and conditional
statements.

ii.
 Data Flow Testing:
Analyzing how data is input, processed, and output within the application. This helps
in identifying potential vulnerabilities and ensuring proper data handling.

 Path Testing:
Testing all possible paths from the start to the end of a function or program. This
ensures comprehensive coverage of the code.

 Unit Testing:
Testing individual units or components of the software in isolation. It helps identify
defects early in the development process.

 Integration Testing:
Verifying the interactions between different units or components to ensure they work
together as expected.

 Static Analysis: Examining the code without executing it. This can include code
reviews, walkthroughs, and using tools to analyze the source code for potential issues.

 Mutation Testing: Introducing small changes (mutations) to the code to assess


the effectiveness of the test cases in detecting these changes. This helps evaluate the
robustness of the test suite.

 Black Box Testing:


Black box testing is a software testing method that focuses on the functionality of a system
without examining its internal code or structure. Testers assess inputs and observe outputs to
ensure the system behaves as expected. This type of testing is primarily concerned with
validating functional requirements, detecting errors, and ensuring proper integration among
components. Black box testing helps identify discrepancies between expected and actual
outcomes, enhancing the overall quality and reliability of the software.

ii.
 No Knowledge of Internal Code:
Testers perform black box testing without having knowledge of the internal code,
design, or implementation details of the software. The focus is solely on the system's
externally visible behavior.

 Input-Output Analysis:
Testers design test cases based on the system's specifications and requirements. Inputs
are provided, and outputs are observed to ensure the system behaves correctly under
various conditions.

 Functional Testing:
Black box testing verifies the functional aspects of the software, ensuring that it
performs tasks according to the specified requirements. This includes testing features,
user interfaces, APIs, databases, and more.

 Equivalence Partitioning:
Testers divide the input domain into classes or groups and then choose representative
test cases from each group. This helps ensure that the software behaves consistently
within each category.

 Boundary Value Analysis:


Test cases are designed to evaluate the system's behavior at the boundaries of input
domains. This is crucial for identifying potential issues that may arise at the edges of
acceptable input ranges.

 Error Guessing:
Testers use their experience and intuition to predict potential errors or weak points in
the system and design test cases to explore these areas.

ii.
 Regression Testing:
Black box testing is often repeated after code changes to ensure that new
modifications do not negatively impact existing functionalities.

 Usability Testing
Evaluates the software's user interface, navigation, and overall user experience to
ensure it meets user expectations.

 Compatibility Testing
Checks whether the software functions correctly across different environments,
operating systems, browsers, or devices.

 Performance Testing:
Assesses the software's responsiveness, speed, and overall performance under various
conditions.

 Security Testing:
Black box testing can also include evaluating the system's security features to identify
vulnerabilities and ensure data protection.

ii.
Models Used In Software

Waterfall Model or Iterative Model.

Waterfall Model:
The code appears to have a linear flow, starting from inputting a year, determining calendar
details, and then offering options to display and add memos. This sequential order resembles
the phases of the Waterfall Model (requirements, design, implementation, testing,
deployment).
Each function in the code seems to handle a specific stage or task, which is characteristic of
the Waterfall Model's phased approach.

Definition
The Waterfall model is a linear and sequential software development methodology. It was
one of the earliest methods used in software development and is characterized by distinct
phases that flow downwards, similar to a waterfall (hence the name). The process progresses
through several defined stages:

Requirements:
Gathering and documenting all the requirements for the software to be developed.

 Design:
Creating a detailed blueprint or design based on the gathered requirements.

 Implementation: The actual coding or development of the software based on


the design.

ii.
 Testing:
Thoroughly testing the developed software to identify and fix any defects or issues.

 Deployment:
Deploying the tested and approved software into the target environment.

 Maintenance: Providing ongoing support, updates, and maintenance to the


software.

ii.
SOURCE CODE
#include<stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_MEMO_LENGTH 1000


#define FILENAME "memo.txt"

#define TRUE 1
#define FALSE 0

int days_in_month[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
char *months[]=
{
" ",
"\n\n\nJanuary",
"\n\n\nFebruary",
"\n\n\nMarch",
"\n\n\nApril",
"\n\n\nMay",
"\n\n\nJune",
"\n\n\nJuly",
"\n\n\nAugust",
"\n\n\nSeptember",
"\n\n\nOctober",
"\n\n\nNovember",
"\n\n\nDecember"
};

int inputyear(void)
{
int year;

printf("Please enter a year (example: 1999) : ");


scanf("%d", &year);
return year;

ii.
}

int determinedaycode(int year)


{
int daycode;
int d1, d2, d3;

d1 = (year - 1.)/ 4.0;


d2 = (year - 1.)/ 100.;
d3 = (year - 1.)/ 400.;
daycode = (year + d1 - d2 + d3) %7;
return daycode;
}

int determineleapyear(int year)


{
if(year% 4 == FALSE && year%100 != FALSE || year%400 == FALSE)
{
days_in_month[2] = 29;
return TRUE;
}
else
{
days_in_month[2] = 28;
return FALSE;
}
}

void calendar(int year, int daycode)


{
int month, day;
for ( month = 1; month <= 12; month++ )
{
printf("%s", months[month]);
printf("\n\nSun Mon Tue Wed Thu Fri Sat\n" );

// Correct the position for the first date


for ( day = 1; day <= 1 + daycode * 5; day++ )
{

ii.
printf(" ");
}

// Print all the dates for one month


for ( day = 1; day <= days_in_month[month]; day++ )
{
printf("%2d", day );

// Is day before Sat? Else start next line Sun.


if ( ( day + daycode ) % 7 > 0 )
printf(" " );
else
printf("\n " );
}
// Set position for next month
daycode = ( daycode + days_in_month[month] ) % 7;
}
}
void displayMemos() {
FILE *file = fopen(FILENAME, "r");
if (file == NULL) {
printf("\n");
printf("No memos found!\n");
return;
}

char memo[MAX_MEMO_LENGTH];
printf("=== Memos ===\n");
while (fgets(memo, sizeof(memo), file) != NULL) {
printf("%s", memo);
}
printf("=============\n");

fclose(file);
}

void addMemo() {
FILE *file = fopen(FILENAME, "a");
if (file == NULL) {
printf("Error opening file!\n");

ii.
return;
}

char memo[MAX_MEMO_LENGTH];
printf("Enter memo (enter date then type task):Eg 24 Sep Car Washing\n",
MAX_MEMO_LENGTH);
fgets(memo, sizeof(memo), stdin);

// Remove trailing newline character if present


if (memo[strlen(memo) - 1] == '\n') {
memo[strlen(memo) - 1] = '\0';
}

fprintf(file, "%s\n", memo);


printf("Memo added successfully!\n");

fclose(file);

}
int main(void)
{
int year, daycode, leapyear,choice;

year = inputyear();
daycode = determinedaycode(year);
determineleapyear(year);
calendar(year, daycode);
printf("\n");
printf("\n");
printf("\n");

do {
printf("1. Display task\n");
printf("2. Add task\n");
printf("3. Exit\n");
printf("\n");
printf("Enter your choice: ");
scanf("%d", &choice);

getchar(); // Consume newline left by scanf

ii.
switch (choice) {
case 1:
displayMemos();
break;
case 2:
addMemo();
break;
case 3:
printf("Exiting...\n");
break;
default:
printf("Invalid choice! Please enter again.\n");
}
} while (choice != 3);

return 0;
}

OUTPUT

ii.
ii.
ii.
Conclusion

The project C calendar helps project managers monitor deadlines, optimize tasks, and
coordinate team efforts.

The timeline provides a representation of the progress of a project to keep it on track. It


increases accountability and improves communication. Resources can be properly allocated,
and contingency plans put in place.

ii.
Bibliography
 Programming in ANSI C (Book of C Language )
 Google.com
 https://www.bloodshed.net/
 Bing.com
 Wikipedia

ii.

You might also like