In: Computer Science
C Mini Project is a mini application that could be developed using C language that involves the concepts of arrays, functions, read and write data techniques. Based on your creativity, you are required to plan, design and develop a mini application for an organisation.
You may choose to from the list below or propose your own mini application:
1. Customer Billing System
2. Employee Record System
3. Contact Management System
4. Appointment Management System
5. Attendance Record System
Your responsibility is to ensure that this project is delivered on time and within the budget. Therefore, you need to plan, design and develop it incorporating the following requirements:
a) Pick an idea and design proposal. [40 marks]
Your proposal should at least contain the following sections and subsections:
1. Introduction/overview of mini application/system
-Includes problem statement, objectives, target users, scope of application and development methodology.
-Milestones
2. Analysis
-Includes an evaluation of choice of tool and feasibility study.
3. Design
-Explanation on flowchart and development methodology
4. Conclusion and recommendations
-Includes potential contribution of animation, limitations and future enhancements.
5. References
6. Appendix (if any)
b) Identify and list all the User defined Functions to be used in the system.
[10 marks]
c) Explain all the features that will be included with a storyboard.
[30 marks]
d) Prepare the Pseudocode and convert it into a flowchart.
[20 marks]
2.Employee Record System
Proposal:
Employee Record System is one of the important and much needed application for a large or medium scale organization. Employee details will be used very frequently in any organization for different purposes. An effective employee record system will provide easy and quick analysis of any requirement. Sometimes we must use employee records as our transactional data, in this case the employee data should be well organized and easy to access.
In this application I wanted to develop,
a) function to get all the employee details.
b) function to get a specific employee by Id.
d)function to get employee who are all having a specific salary range.
e) function to add an Employee
f) function to remove the employee from existing list
g) function to get total salary paid for the all employees by the employer.
The major advantage of the application is to provide a better medium to access all the employee records
Problem Statement:
It’s difficult to access employee records for different different requirements from an unstructured type of file system. When I want to get an employee whose id is 10101, do I need to search all the files to find?
Target Users:
Target User will be change from organization to organization. Human Resource Team can easily get the employee information in a structured and easy way with defined advanced features. For internal use, if employee data is not used as transactional data. For organizations which are into payroll processing kind of business will use employee data as transactional data, then finance team will also be target users.
Scope:
Scope of the application will be Internal only. In very rare cases the scope will be external, when some educational group or some industries which have to populate their employee data to public.
Development:
Development will be done in waterfall model, means, once development then development process will start, after that the application will be sent to the production. Technical requirements will be C language alone.
Analysis: Since the requirement is to built application using C program, no need of any server, or data base. Simply we will development in Normal C ide which will be Turbo C.
Design: since this is a mini project flow chart will be not that required. Since I have time constraint to answer the question, I am skipping flow chart, please draw flow chart on your own.
Development: The actual development of any project will consist of multiple scrums and all. Since ours is normal application, we will develop this in one single file.
EmployeeRecordApp.c:
#include <stdio.h>
void getAllEmployee();
void getEmployeeById();
void getEmployeeSalaryLessThan();
void AddEmployee();
void RemoveEmployee();
void GetTotalSalaryForEmployee();
int EmpId[100];
int EmpName[100];
int EmpSalary[100];
int EmpGender[100];
int EmpAge[100];
bool isCurrentEmployee[100];
int numberOfEmployees=0;
int EmployeeId=10101;
int main()
{
int yesOrNo=999;
do
{
int choice;
printf("Please choose one of the Choice below: ");
printf("1.Add Employee\n");
printf("2.RemoveEmployee \n");
printf("3.getEmployeeById\n");
printf("4.getEmployeeSalaryLessThan Range\n");
printf("5.getAllEmployee\n");
printf("6.GetTotalSalaryForEmployee\n");
scanf("%d",&choice);
switch(choice)
{
case 1:AddEmployee();
break;
case 2:RemoveEmployee();
break;
case 3:getEmployeeById();
break;
case 4:getEmployeeSalaryLessThan();
break;
case 5:getAllEmployee();
break;
case 6:GetTotalSalaryForEmployee();
break;
}
printf("do you want to continue: yes:1 or No 2");
scanf("%d",&yesOrNo);
}while(yesOrNo==1);
return 0;
}
void getAllEmployee()
{
printf("\n=====================================");
printf("All Of the employees are: \n");
printf("\nId Name Salary Gender Age ");
for(int i=0;i<numberOfEmployees;i++)
{
printf("\n%d %s %d %c %d",EmpId[i],EmpName[i],EmpSalary[i],EmpGender[i],EmpAge[i]);
}
}
void getEmployeeById()
{
int id;
printf("\n=====================================");
printf("\nEmter the Employee Id you want to see:");
scanf("%d",&id);
printf("\nThe Employee With ID: %d",id);
for(int i=0;i<numberOfEmployees;i++)
{
if(EmpId[i]==id && isCurrentEmployee[i]==1)
{
printf("\n%d %s %d %c %d",EmpId[i],EmpName[i],EmpSalary[i],EmpGender[i],EmpAge[i]);
}
else
{
printf("\nEmployee Not Found with Id: %d",id);
}
}
}
void getEmployeeSalaryLessThan()
{
int salaryRange;
printf("\n=====================================");
printf("\nEmter the salary you want to find employees who are getting less:");
scanf("%d",&salaryRange);
printf("\nThe Employee whoose salary lessthan: %d",salaryRange);
for(int i=0;i<numberOfEmployees;i++)
{
if(EmpSalary[i]<salaryRange && isCurrentEmployee[i]==1)
{
printf("\n%d %s %d %c %d",EmpId[i],EmpName[i],EmpSalary[i],EmpGender[i],EmpAge[i]);
}
else
{
printf("\nNo Employee Have less salary than: %d",salaryRange);
}
}
}
void GetTotalSalaryForEmployee()
{
printf("\n=====================================");
int totalSalary=0;
for(int i=0;i<numberOfEmployees;i++)
{
if(isCurrentEmployee[i]==1)
{
totalSalary=totalSalary+ EmpSalary[i];
}
}
printf("\nThe Total Salary giving for all Employees is :%d",totalSalary);
}
void RemoveEmployee()
{int id;
printf("\n=====================================");
printf("\nEmter the Employee Id whoom you want to Remove:");
scanf("%d",&id);
printf("\nRemoving Employee : %d",id);
int temp=999;
for(int i=0;i<numberOfEmployees;i++)
{
if(EmpId[i]==id && isCurrentEmployee[i]==1)
{
isCurrentEmployee[id]=0;
temp=0;
}
}
if(temp==0)
{
printf("\nRemoved Employee Successfully!!");
}
else
{
printf("\nEmployee Not found to Remove!!");
}
}
void AddEmployee()
{
EmployeeId=EmployeeId+1;
char name[100];
int salary;
char gender;
int age;
printf("Employee Name: ");
scanf("%s",&name);
printf("Employee salary: ");
scanf("%d",&salary);
printf("Employee gender: ");
scanf("%c",&gender);
printf("Employee age: ");
scanf("%d",&age);
numberOfEmployees=numberOfEmployees+1;
EmpId[numberOfEmployees]=EmployeeId;
EmpName[numberOfEmployees]=name;
EmpSalary[numberOfEmployees]=salary;
EmpGender[numberOfEmployees]=gender;
EmpAge[numberOfEmployees]=age;
isCurrentEmployee[numberOfEmployees]=1;
printf("\nSuccess fully Added Employee: %d",EmpId[numberOfEmployees]);
}
Note: To Answer a question we do have some time limit, I tried my best to cover most of the project. In the code if you want more functions you can add.I have taken basic example functions. I missed flow charts due to time constraint only.