Skip to content

Repository files navigation

Vehicle Rental System 🚗🚐

A sleek GUI-based desktop application built in C# with Windows Forms = mini-project.

Last Commit License .NET Framework


📋 Overview

The Vehicle Rental System is a user-friendly application that allows customers to rent vehicles (Cars or Vans) by selecting models, destinations, and locations. It calculates rental costs for single-day and two-day periods, demonstrating encapsulation and polymorphism in a clean Windows Forms interface.

Developed for the IT21053 mini-project, this project showcases object-oriented programming principles with a focus on simplicity and functionality.

✨ Features

  • Vehicle Selection:
    • 🛻 Cars: Alto, Prius, Axio.
    • 🚐 Vans: KDH, HiAce, Every.
  • Dynamic Cost Calculation:
    • Costs vary by vehicle type and destination:
      • Car: Colombo (Rs. 5000), Kandy (Rs. 6000), Galle (Rs. 6500).
      • Van: Colombo (Rs. 8000), Kandy (Rs. 10000), Galle (Rs. 10500).
    • Supports single-day and two-day rentals.
  • Intuitive Interface:
    • Form1: Select vehicle, model, destination, and location using ComboBoxes.
    • Form2: Displays rental details and costs with a return button.
  • Seamless Navigation:
    • Calculate costs and view results in Form2.
    • Return to Form1 with a single click.

🛠 OOP Concepts

This project implements two core OOP principles:

  • 🔒 Encapsulation:
    • Private fields (model, type) in Vehicle.cs are accessed via public properties (Model, Type), ensuring data integrity.
    • Example: Form2 safely displays vehicle details like "Car - Alto".
  • 🔄 Polymorphism:
    • Method Overriding: CalculateCost in Car.cs and Van.cs provides vehicle-specific pricing.
    • Method Overloading: CalculateCost in Vehicle.cs handles single-day and multi-day rentals.
    • Example: Form2 shows tailored costs based on vehicle and destination.

💻 Technologies

  • Language: C#
  • Framework: .NET Framework 4.8
  • GUI: Windows Forms
  • IDE: Visual Studio 2022
  • Version Control: Git & GitHub

🚀 Getting Started

Prerequisites

About

Vehicle Rental System in C#

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages