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

2033 Java Project

Uploaded by

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

2033 Java Project

Uploaded by

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

Name : Omkar dhanavade

Roll NO : 2033

THE CAR COMPANY MANAGEMENT SYSTEM


Name : Omkar dhanavade
Roll NO : 2033

PROJECT REPORT ON
“PROJECT NAME”

IN PARTIAL FULFILLMENT OF

BACHELOR OF INFORMATION TECHNOLOGY

SEMESTER II – 2023-24

PROJECT GUIDE
Name Prof. Kanchan Shah

SUBMITTED BY: Omkar Dhanavade


ROLL NO: 2033
Name : Omkar dhanavade
Roll NO : 2033

Evaluation sheet for continuous assessment with rubrics


Class: Computer Science
Subject: Core Java
Details about the continuous Assessment 2/Project work

Name of the Student : Omkar Dhanavade


Roll Number : 2033 Class / Division : c
Name of Evaluator: Kanchan Shaha

Grading Criteria Fai Goo Excelle Total


r d nt
Introduction/
Description of /5
the Case
SWOT
Analysis of /3
the company
used for case
analysis
pertaining to
the case
(strength of
CA2 topic:
e.g main
important
feature of
CA1,
Weakness:
limitations of
the project,
Opportuniti
es: in carrier
in the future,
Threat:
obstacles that
can cause
failure to
Name : Omkar dhanavade
Roll NO : 2033

project CA2
Learnings from the
case
/4
Delivery/
presentation skills /3
Total
/15

 Inform the class the rubric format and the method of evaluation.

Co-ordinator,
Shubhangi Pawar

Introduction :
The Car Company Management System is a robust Java application
meticulously crafted to streamline the intricate processes involved in
overseeing a car company's operations. It serves as a centralized platform for
managing inventory, sales transactions, and comprehensive statistical
analysis, offering a holistic solution to meet the dynamic demands of the
automotive industry.In today's competitive market, efficient management of
inventory is paramount for the success of any car company. The Car
Company Management System empowers users with the capability to
seamlessly add new cars to the inventory, update stock levels in real-time, and
ensure accurate tracking of available vehicles. By providing a user-friendly
interface, the system simplifies the otherwise complex task of managing a
diverse range of car models, allowing for efficient allocation of resources and
optimal utilization of inventory space.Moreover, the system facilitates the
sales process by offering functionalities for selling cars with automated profit
calculations. Through intuitive features, users can initiate sales transactions,
specifying the desired model and quantity, while the system automatically
computes the profit generated from each sale. This not only streamlines the
sales process but also enables users to make informed decisions regarding
Name : Omkar dhanavade
Roll NO : 2033

pricing strategies and sales targets.In addition to facilitating day-to-day


operations, the Car Company Management System offers valuable insights
into the company's performance through comprehensive statistical analysis.
By aggregating data on inventory levels, sales transactions, and financial
metrics, the system provides users with actionable insights into key
performance indicators such as total stock levels and cumulative profit.
Furthermore, the system enhances decision-making capabilities by presenting
statistical information in a clear and concise manner, enabling stakeholders to
identify trends, evaluate performance, and strategize for future growth. In
essence, the Car Company Management System represents a culmination of
advanced technology and industry expertise, designed to empower car
companies with the tools they need to thrive in today's competitive market
landscape. By offering a comprehensive suite of features for inventory
management, sales optimization, and statistical analysis, the system enables
car companies to streamline their operations, maximize efficiency, and drive
sustainable growth in an ever-evolving industry.
Code :

import java.util.Scanner;

// Sellable.java

interface Sellable {

void sell(int quantity) throws OutOfStockException;

// OutOfStockException.java
Name : Omkar dhanavade
Roll NO : 2033

class OutOfStockException extends Exception {

public OutOfStockException(String message) {

super(message);

// Vehicle.java

abstract class Vehicle implements Sellable {

private String model;

private int stock;

private double price;

public Vehicle(String model, int stock, double price) {

this.model = model;

this.stock = stock;

this.price = price;
Name : Omkar dhanavade
Roll NO : 2033

public String getModel() {

return model;

public int getStock() {

return stock;

public double getPrice() {

return price;

@Override

public void sell(int quantity) throws OutOfStockException {


Name : Omkar dhanavade
Roll NO : 2033

if (stock >= quantity) {

double originalPrice = price * quantity;

double profit = 0.10 * originalPrice;

stock -= quantity;

System.out.println("Car(s) sold successfully with a profit of " +


profit);

} else {

throw new OutOfStockException("Sorry, the car is out of stock.");

// Abstract method to be implemented by subclasses

public abstract void start();

// Abstract method to be implemented by subclasses

public abstract void stop();

}
Name : Omkar dhanavade
Roll NO : 2033

// ElectricCar.java

class ElectricCar extends Vehicle {

private int batteryCapacity;

public ElectricCar(String model, int stock, double price, int


batteryCapacity) {

super(model, stock, price);

this.batteryCapacity = batteryCapacity;

@Override

public void start() {

System.out.println("Electric car started");

@Override
Name : Omkar dhanavade
Roll NO : 2033

public void stop() {

System.out.println("Electric car stopped");

// InternalCombustionCar.java

class InternalCombustionCar extends Vehicle {

private int fuelCapacity;

public InternalCombustionCar(String model, int stock, double price, int


fuelCapacity) {

super(model, stock, price);

this.fuelCapacity = fuelCapacity;

@Override

public void start() {


Name : Omkar dhanavade
Roll NO : 2033

System.out.println("Internal combustion car started");

@Override

public void stop() {

System.out.println("Internal combustion car stopped");

// CarCompanyManagementSystem.java

public class CarCompanyManagementSystem {

private static final int MAX_CARS = 100;

private static int totalCars = 0;

private static String[] carModels = new String[MAX_CARS];

private static int[] carStocks = new int[MAX_CARS];

private static double[] carPrices = new double[MAX_CARS];


Name : Omkar dhanavade
Roll NO : 2033

public static void main(String[] args) {

Scanner scanner = new Scanner(System.in);

while (true) {

System.out.println("Car Company Management System");

System.out.println("1. Add Car");

System.out.println("2. Update Car Stock");

System.out.println("3. Sell Car");

System.out.println("4. Display Cars");

System.out.println("5. Display Statistics");

System.out.println("6. Exit");

System.out.print("Enter your choice: ");

int choice = scanner.nextInt();


Name : Omkar dhanavade
Roll NO : 2033

switch (choice) {

case 1:

addCar(scanner);

break;

// Add other cases for remaining options

case 6:

System.out.println("Exiting the program. Thank you!");

System.exit(0);

default:

System.out.println("Invalid choice. Please enter a valid option.");

public static void addCar(Scanner scanner) {

if (totalCars < MAX_CARS) {


Name : Omkar dhanavade
Roll NO : 2033

System.out.print("Enter Car Model: ");

String model = scanner.next();

System.out.print("Enter Initial Stock: ");

int stock = scanner.nextInt();

System.out.print("Enter Price: ");

double price = scanner.nextDouble();

carModels[totalCars] = model;

carStocks[totalCars] = stock;

carPrices[totalCars] = price;

totalCars++;

System.out.println("Car added successfully!");

} else {
Name : Omkar dhanavade
Roll NO : 2033

System.out.println("Cannot add more cars. Maximum limit


reached.");

OUTPUT :

Car Model , Initial Stock, Price


Name : Omkar dhanavade
Roll NO : 2033

Update A Car Model Stock :

Sell Of cars And Profit

Available cars Stock And Price

Statistics (Total cars in Stock And total Profit )


Name : Omkar dhanavade
Roll NO : 2033

Exiting The Car Showroom Mangement Thank You …!

SWOT analysis

Strengths:

1. User-Friendly Interface:
- The console-based interface makes it easy for users to interact with the
system, especially for simple operations.

2. Modularity:
- The code is organized into functions for specific tasks, promoting a
modular structure and ease of maintenance.

3. Basic Functionality:
- The system covers essential functionalities such as adding cars, updating
stock, selling cars, and displaying statistics.

4. Exception Handling:
- The code incorporates exception handling for certain scenarios, providing
a level of robustness.

Weaknesses:

1.Global Variables:
- The use of global arrays for car models, stocks, and prices may lead to
potential issues with scalability and maintenance.
Name : Omkar dhanavade
Roll NO : 2033

2. Limited Features:
- The system lacks more advanced features like user authentication,
database integration, and a graphical user interface (GUI).

3. Input Validation:
- The code does not perform comprehensive input validation, which could
lead to unexpected behavior if users enter invalid data.

4. No Persistence:
- The system does not save data between program executions, relying solely
on arrays stored in memory.

Opportunities:

1. Enhancements:
- Opportunities exist for enhancing the system with advanced features, such
as GUI, database integration, and additional statistical analysis.

2. Database Integration:
- Incorporating a database to store car information could improve data
persistence and management.

3. User Authentication:
- Implementing user authentication and access control could enhance
security and restrict access to authorized users.

4. Error Logging:
- Introducing error logging mechanisms could aid in debugging and
improving system reliability.

Threats:

1. Security Risks:
- Lack of user authentication and authorization poses a security risk,
especially if the system is deployed in a networked environment.

2. Data Loss:
Name : Omkar dhanavade
Roll NO : 2033

- The absence of data persistence may lead to data loss if the application is
closed or crashes.

3. Limited Scalability:
- The reliance on arrays and a console interface may limit the scalability of
the system for larger datasets or more complex functionality.

4. Technological Changes:
- Changes in technology or Java versions may require updates to the code
for compatibility and security reasons.

Objectives
1. Manage Car Inventory:
- Allow users to add new cars to the system, specifying details such as model,
initial stock, and price.
- Implement functionality to update the stock of existing cars.

2. Sell Cars:
- Enable users to sell cars, considering stock availability and calculating
profits.

3. Display Cars:
- Provide an option to display the current inventory of cars, including details
like model, stock, and price.

4. Display Statistics:
- Offer insights into the overall statistics of the car company, such as the
total number of cars in stock and the total profit.

5. User Interaction:
- Facilitate user interaction through a menu-driven system, where users can
choose from different options (add car, sell car, etc.).

6. Input Validation:
- Implement input validation to ensure that users provide valid information
and make valid choices.
Name : Omkar dhanavade
Roll NO : 2033

7. Exit Mechanism:
- Allow users to exit the program gracefully.

8. Object-Oriented Design:
- Utilize object-oriented principles by creating classes such as `Vehicle`,
`ElectricCar`, `InternalCombustionCar`, and
`CarCompanyManagementSystem`.

9. Exception Handling:
- Handle exceptions appropriately, such as when selling cars that are out of
stock.

10. Encapsulation:
- Use encapsulation to encapsulate the state of the cars and ensure proper
data access.

11. Scalability:
- Design the system with scalability in mind, allowing for the potential
addition of more features or cars in the future.

12. User-Friendly Interface:


- Create a user-friendly interface through a clear and well-structured menu
system.

You might also like