0% found this document useful (0 votes)
7 views

Lab Report-C# Classes development

Lab report cse

Uploaded by

ajr819183
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Lab Report-C# Classes development

Lab report cse

Uploaded by

ajr819183
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab Report: Core C# Classes Development

Introduction
This report explains how the main C# classes were created for the Restaurant Billing System.
The goal was to build a simple and organized backend for the system. These core classes are
important because they handle the main functions and make the system easy to manage and
expand.

The focus was on creating basic classes for key parts of the system, like customers, orders, and
menu items. A good class design makes the code easier to reuse, read, and improve in the future.

Methodology
The development of core C# classes was done step by step:

1. Understanding Requirements

First, we identified the main parts of the system and what information each part needs:

• Customer: This class represents the people placing orders. It includes details like Name,
Contact Number, and Address.
• MenuItem: This class represents the food items available in the restaurant. It includes
details like Item Name, Price, and Category.
• Order: This class represents an order placed by a customer. It includes details like Order
ID, Customer Information, List of Items, and Total Amount.

2. Designing Classes

We made diagrams to show how the different parts of the system are connected. The following
classes were created:

1. Customer Class
o Details: Name, Contact Number, Address
o Actions: PlaceOrder(), ViewOrderHistory()
2. MenuItem Class
o Details: Item Name, Price, Category
o Actions: UpdatePrice(), GetItemDetails()
3. Order Class
o Details: Order ID, Customer Info, Items List, Total Amount
o Actions: CalculateTotal(), AddItem(), RemoveItem(), GetOrderDetails()

3. Coding the Classes

The classes were coded in C# using Visual Studio. We used key programming ideas like:

• Encapsulation: Keeping class details private and using public methods to access them.
• Inheritance: Using a base class to share common features between different classes.
• Polymorphism: Allowing the same method to do different things depending on the
object.

4. Testing the Classes

After creating the classes, we tested them to make sure they worked correctly. The testing
process included:

• Creating sample objects for each class.


• Using different methods to see if they gave the right results.
• Fixing any problems and improving the code.

Results and Discussion


The core classes were successfully created and tested. Here are the key results:

• Reusable Code: The classes can be used in different parts of the system.
• Easy to Maintain: The structure makes it simple to update and manage the system.
• Expandable: New features can be added without changing the existing code too much.

Some areas need improvement:

• Error Handling: Adding better error handling will make the classes more reliable.
• New Features: We can add more features like discounts and promotions.
Conclusion
The Core C# Classes Development for the Restaurant Billing System helped build a solid
backend. The simple and organized class structure makes the system efficient, easy to maintain,
and ready for future updates.

Future Improvements

• Adding more advanced methods to the classes.


• Improving error handling and validation.
• Enhancing the class design to support extra features like customer loyalty programs.

You might also like