OOP Microproject 45-48
OOP Microproject 45-48
using Constructor
Submitted in fulfillment of the requirements of
micro-project
By
45 Manas Patil
46 Shravani Patil
47 Sudeep Patil
48 Rohan Rajage
ENROLLMENT NO:
23112120333
23112120334
23112120335
23112120336
SUBJECT INCHARGE
“Store Management by
using Constructor”
is done by
“Manas Patil”
“Shravani Patil”
“Sudeep Patil”
“Rohan Rajage”
is submitted for
using Constructor
Submitted in fulfillment of the requirements
of micro-project
By
46 Shravani 23112120334
Patil
47 Sudeep 23112120335
Patil
48 Rohan 23112120336
Rajage
SUBJECT INCHARGE
( Mrs. Jyoti Shinde )
Vision: -
Mission: -
PO1: Basic and Discipline specific knowledge: Apply knowledge of basic mathematics,
science and engineering fundamentals and engineering specialization to solve the engineering
problems.
PO2: Problem analysis: Identify and analyze well-defined engineering problems using
codified standard methods.
PO7: Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes
COMPUTER ENGINEERING DEPARTMENT PROGRAMME
EDUCATIONAL OBJECTIVES
PEO1: Provide socially responsible, environment friendly solutions
to Computer engineering related broad-based problems adapting professional ethics.
using Constructor
• Aim: -
" Constructor Usage: The constructor is used to initialize the properties (itemID,
itemName, itemPrice, and itemQuantity) when an object of Store is created.”
“Simple Store Management: The program allows you to store and display item details
and calculate their total value based on the price and quantity.”
• Course Outcomes: -
Subject In-charge
using Constructor
Rationale:
The rationale for the "Store Management by Using Constructor" micro project is to provide
students with a practical application of object-oriented programming (OOP) concepts, specifically
the use of constructors for initializing objects. By developing a simple store management system,
students can learn how to design and implement classes, work with constructors, and manage data
efficiently. This project helps in understanding key OOP principles like data encapsulation, object
initialization, and class design.
Literature:
The literature for the "Store Management by Using Constructor" micro project explores the
application of Object-Oriented Programming (OOP) principles, particularly in C++. OOP is a
programming paradigm that organizes software around objects and classes, enabling more
modular, reusable, and maintainable code. In this context, constructors play a crucial role in
initializing objects, ensuring that they are in a valid state from the moment they are created. The
use of constructors to initialize item details such as ID, name, price, and quantity in a store
management system is a direct application of this concept.
Resources Required:
Sr. Name of Specification Qty. Remark
Resources
No.
(components
)
Skill Developed:
2.C++ Programming Proficiency: Through the project, students gain hands-on experience with C++,
understanding how to write and organize code effectively, especially with regard to constructors,
methods, and handling basic input/output operations.
3.Problem-Solving and Logical Thinking: Developing a store management system enhances critical
thinking, as students must break down the problem into smaller tasks
Source Code:
#include <iostream.h>
#include <conio.h>
class Store {
private:
int itemID;
char itemName[30];
float itemPrice;
int itemQuantity;
public:
Store(int id, const char* name, float price, int quantity) : itemID(id), itemPrice(price),
itemQuantity(quantity) {
copyName(name);
}
void displayItemDetails()
{
cout << "\nItem ID: " << itemID;
cout << "\nItem Name: ";
cout << itemName;
cout << "\nItem Price: " << itemPrice;
cout << "\nItem Quantity: " << itemQuantity;
}
float calculateTotalValue() {
return itemPrice * itemQuantity;
}
};
void main() {
clrscr();
Store item1(101, "Notebook", 45.50, 150);
Store item2(102, "Pen", 10.00, 300);
item1.displayItemDetails();
cout << "\nTotal Value of Item 1: " << item1.calculateTotalValue();
item2.displayItemDetails();
cout << "\nTotal Value of Item 2: " << item2.calculateTotalValue();
item1.updateItemDetails(200, 50.00);
cout << "\n\nAfter updating Item 1:";
item1.displayItemDetails();
cout << "\nTotal Value of Item 1 after update: " << item1.calculateTotalValue();
getch();
}
Output:-
Working principle:
" The working principle of the "Store Management by Using Constructor" system revolves
around object-oriented programming concepts, particularly the use of constructors to initialize
data. When a store item object is created, the constructor is invoked to automatically assign
values such as the item ID, name, price, and quantity. The system then allows the user to
interact with these objects by displaying item details, updating quantities or prices, and
calculating the total value of the items based on the price and quantity”.
Result
" It is a functional and efficient store management system implemented in C++ using object-oriented
programming principles. The system allows for the creation of store items with initial details (item
ID, name, price, and quantity) through the use of constructors.”
For instance, when the program runs, the user will see a list of store items with their details.
Conclusion
" The "Store Management by Using Constructor" highlights the successful implementation of
object-oriented programming (OOP) principles in solving a real-world problem. By utilizing
constructors, the project effectively initializes and manages store item data, ensuring that each
item’s details are captured and displayed accurately. The project demonstrates the practical
application of core OOP concepts like encapsulation and modularity, ensuring that data is
protected and handled through well-defined functions”.
Reference:
1. Object-Oriented Programming Concepts' by John Wiley &
Sons.
GeeksforGeeks
Subject Incharge
(Mrs.Jyoti Shinde)