0% found this document useful (0 votes)
61 views14 pages

Project Report CSE 1209

This document is a project report for a medical store management system created using C programming. It includes an introduction describing the motivation and objectives of managing a medical store inventory in an organized way. It outlines the methodology used, including flowcharts, hardware/software requirements, and sample code snippets. It also describes implementing and testing the system, which allows admin to add/delete products and view feedback, and users to search products, place orders, and leave feedback.

Uploaded by

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

Project Report CSE 1209

This document is a project report for a medical store management system created using C programming. It includes an introduction describing the motivation and objectives of managing a medical store inventory in an organized way. It outlines the methodology used, including flowcharts, hardware/software requirements, and sample code snippets. It also describes implementing and testing the system, which allows admin to add/delete products and view feedback, and users to search products, place orders, and leave feedback.

Uploaded by

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

Project Report

On

Medical Store Management System using C


Programming Language

Course No: CSE 1210


Course Name: Computer Fundamentals and Programming Laboratory

Submitted By-
Maria Rahman
Roll: 2109011

16 October, 2023

Department of Electronics and Communication Engineering


Khulna University of Engineering & Technology
Khulna-9203, Bangladesh.
Problem Statement

Develop a C programming project or problem solution system as a beginner to gain more


C programming skills using the following open-ended features:

Open-ended features:
1. You should use at least two user-defined functions with “call by value” and “call by
reference”.
2. You should use at least one array and one string in the whole project.
3. The project should have at least one if-else statement and one loop statement.
4. You should use ‘FILE’ to save and update data.
5. You also may choose any data types, operators, and expressions.

Result analysis:
1. Analyze the time required to complete the whole project.
2. Did you observe any invalid input or any error during run-time?

Evaluation
Open-ended features Remarks
user-defined functions
array and string
if-else statement and loop statement.
use of ‘FILE’

Above Below Marks


Excellent Average
Average Average (10)
Organization/Presentation
Necessary data presentation
Result Analysis
Conclusion

_______________
Signature of Examiner

2
Contents

Problem Statement ..................................................................................................................... 2


Evaluation .................................................................................................................................. 2
1. Introduction ............................................................................................................................ 4
1.1. Motivation and Background ............................................................................................ 4
1.2. Objectives ........................................................................................................................ 4
2. Current works......................................................................................................................... 4
3. Methodology .......................................................................................................................... 4
3.1 Flow chart......................................................................................................................... 5
3.2 Hardware and Software Requirements ............................................................................. 6
4. Implementation and Testing .................................................................................................. 6
4.1 Sample Codes ................................................................................................................... 6
4.2 Sample Input Output ...................................................................................................... 13
5. Conclusion ........................................................................................................................... 14
5.1 Future work .................................................................................................................... 14
References ................................................................................................................................ 14

3
1. Introduction
A medicine store management system for Admin and User panel.Admin can add or delete any
product,view all the products and read customer feedbacks.User can search from the
inventory,place order,give feedback and get recommendations or exit the program.

1.1. Motivation and Background


The main motivation of the project is to manage any medical store or pharmacy in a more
organized way.So both end can either offer or enjoy the service hasslefree.

1.2. Objectives
1.To provide user the ability to register and login and search for the desired medicine.
2.To give the admin panel secured login and handle the inventory and check feedbacks.
3.To manage inventory.Keeping track of medicine inventory including name,price and
quantity.

2. Current works
The console prompts the role.The admin can securely login.Add or Delete products,check
feedback and see the entire inventory.Whereas the user can login by registering first.Then he
has options to look for recommendations,search from the inventory,place order or give
feedback.

3. Methodology
At the beginning user gets asked his role.Here I have used switch for further steps according to
role.Clicking 1 as admin he is asked to put the password.Only Entering the right password will
let him go for further steps.After login successfully a congratulating text is shown and many
options are given.The options are given using switch.After selecting any of those options,some
more tasks will be happening.These are mostly done using user defined funtions.If user chooses
wrong option it goes to default and shows Invalid Choice.
If the role is of an user.User also gets many options available he can choose from.
The switch is in a do while loop.So if admin or user once choose any option.It will again start
ask the role.
Most of the options are more defined using user defined functions,string library functions,if-
else statement.In the user defined function,both call by value and call by reference was used.
In the main function a lot of the thing is declared as array and strings.

4
Again at the beginning the informations about the medicine,login information is stored in a
structure.
Typedef is used to declare recommendations.And an array is used to define those
recommendations.
3.1 Flow chart

5
3.2 Hardware and Software Requirements
Operating system: Windows 10
RAM:A minimal amount of RAM should be sufficient.
Storage:Any system with a reasonable amount of free storage is suitable.

4. Implementation and Testing


There will be a welcome message at first.The console will then ask for the role.Admin or
User.If the role is selected admin,he will securely login and manage inventory.If he can’t give
correct password,a message will be shown and he will have to choose his role again.
The user won’t be able to login without registering.But if once registered then he can login by
using the UserID and password.And there he will have his options to explore,view,place
order,get recommendations or exit.

4.1 Sample Codes


#include<stdio.h>
#include<string.h>
#include<stdlib.h>

6
struct login{
char fname[100];
char lname[100];
char username[20];
char password[20];
};
struct Medicine {
char name[50];
int quantity;
int price;
};
typedef struct {
const char* symptom;
const char* medicines[3];
} Recommendation;
Recommendation recommendations[] = {
{"Headache", {"Aspirin", "Ibuprofen", "Ace"}},
{"Allergies", {"Fexo", "Cetirizine", "Diphenhydramine"}},
{"Cough", {"Dextromethorphan", "Guaifenesin", "Codeine"}},
{"Fever", {"Ace", "Ibuprofen", "Napa"}},
};
void registe();
void login();
void addMedicine(struct Medicine inventory[], int *numMedicines) ;
void addMedicineToFile(struct Medicine medicine) ;
void deleteMedicineFromFile(const char* medicineName) ;
void searchMedicine(char *medicineName) ;
void placeOrderFromFile(const char* medicineName, int orderQuantity) ;
void viewInventory() ;
void saveFeedbackToFile(const char* feedback) ;

7
void readPreviousFeedbacks() ;
int main() {
struct Medicine inventory[50];
int opt, cho, menu, user_cho;
int numMedicines = 0;
char medicineName[50];
char admin[20];
char feedback[500];
char orderedItems[50][50];
int quantities[50];
char symptom[50];
int numItems = 0;

printf("\t\t\t\t\tWelcome to the MEDICAL STORE\n\n");

do {
printf("\t\t\t\t\t Press ANY KEY to continue\n\n");
getch();
printf("1. Admin\n2. User\n");
scanf("%d", &opt);

switch (opt) {
case 1:
system("CLS");
printf("\t\t\t\t\t\tADMIN PANEL\n\n");
printf("Enter Admin Password: ");
scanf("%s", admin);

if (strcmp(admin, "Maria") == 0) {
printf("\t\t\t\t\t *****Successful login*****\n");

8
printf("\n\t\t\t\t\t Welcome to Inventory\n");
printf("1. Add Medicine\n");
printf("2. Delete Medicine\n");
printf("3. View Available Medicines\n");
printf("4. Read Customer Feedbacks\n");
printf("Your choice: ");
scanf("%d", &menu);

switch (menu) {
case 1:
addMedicine(inventory, &numMedicines);
break;
case 2:
printf("Enter the name of the medicine to delete: ");
scanf("%s", medicineName);
deleteMedicineFromFile(medicineName);

break;
case 3:
viewInventory(inventory, numMedicines);
break;
case 4:
readPreviousFeedbacks();
break;
default:
printf("Invalid choice. Please try again.\n");
}
} else {
printf("Wrong Password\n");
}

9
break;

case 2:
system("CLS");
printf("1. Register\n2. Login\n");
scanf("%d", &cho);

if (cho == 1) {
system("CLS");
registe();
} else if (cho == 2) {
system("CLS");
login();
}
else
{
printf("Wrong Choice");
break;
}

printf("1. Search Medicine\n");


printf("2. Place Order\n");
printf("3. Give Feedback\n");
printf("4. Get Recommendations\n");
printf("5. Exit\n");
printf("Your choice: ");
scanf("%d", &user_cho);

switch (user_cho) {
case 1:

10
printf("Enter the name of the medicine to search: ");
scanf("%s", medicineName);
searchMedicine(medicineName);
break;
case 2:
printf("Enter the name of the medicine to order: ");
scanf("%s", medicineName);
printf("Enter the quantity to order: ");
int orderQuantity;
scanf("%d", &orderQuantity);
placeOrderFromFile(medicineName, orderQuantity);

if (numItems < 50) {


strcpy(orderedItems[numItems], medicineName);
quantities[numItems] = orderQuantity;
numItems++;
}
break;
case 3:
printf("Welcome to the User Feedback System!\n");
printf("Please enter your feedback (up to 500 characters):\n");
if (scanf(" %[^\n]", feedback) == 1) {
saveFeedbackToFile(feedback);
printf("\n*****Thank you for your feedback. It has been saved.*****\n");
}
else {
printf("Error reading user feedback.\n");
}
break;
case 4:

11
printf("Enter your symptom: ");
scanf("%s", symptom);
int found = 0;
for (int i = 0; i < sizeof(recommendations) / sizeof(recommendations[0]); i++)
{
if (strcmp(symptom, recommendations[i].symptom) == 0) {
found = 1;
printf("Recommended medicines for %s:\n", symptom);
for (int j = 0; j < 3; j++) {
if (recommendations[i].medicines[j] != NULL) {
printf("- %s\n", recommendations[i].medicines[j]);
}
}
break;
}
}
if (found==0) {
printf("No recommendations available for this symptom.\n");
}
break;
case 5:
exit(0);
default:
printf("Invalid choice. Please try again.\n");
}
}
}
while (1);

return 0;
}ahjfoaskfn (Font size 12, Font Name: Times New Roman, Justify Align.)

12
4.2 Sample Input Output
ADMIN PANEL

Enter Admin Password: Maria


*****Successful login*****

Welcome to Inventory
1. Add Medicine
2. Delete Medicine
3. View Available Medicines
4. Read Customer Feedbacks
Your choice: 1
Enter the name of the medicine: Napa
Enter the quantity: 145678
Enter the price: 5
Medicine added to inventory and records.
Press ANY KEY to continue
For User End:
UserID:m
Password:m

*******Succesful login*******

1. Search Medicine
2. Place Order
3. Give Feedback
4. Get Recommendations
5. Exit
Your choice: 1

13
Enter the name of the medicine to search: Napa
Name: Napa, Quantity: 145678, Price: 5
Press ANY KEY to continue

5. Conclusion
This project demonstrates a simple Medical Store Management System from both user and
Admin panel.There is a simple recommendation block to recommend medicine for the user
according to problem.Also to search product and place order.Also for the user to give
feedback.And the admin can manage the inventory.

5.1 Future work


As I have done this project in a very short time,I couldn’t organize it in a way better
manner.More options can also be added in the future.Deleting items in account of their expiry
date.User’s order history and many more.

References
[1] Programming in ANSI C(author: E. Balaguruswamy sir)
[2] https://www.tutorialspoint.com

14

You might also like