car rent system project

car rent system project

pl, may I get a source code in java with user inter face about car rent system. if it is possible pl help me.

View Answers

April 3, 2012 at 5:25 PM

import java.util.*;

class Car { private String make; private String model; private String regNo; private int deposit; private int rate;

    public Car(String newMake, String newModel, String newRegNo,
                    int newDeposit, int newRate) {
            make = newMake;
            model = newModel;
            regNo = newRegNo;
            deposit = newDeposit;
            rate = newRate;
    }

    public String getMake() {
            return make;
    }

    public String getModel() {
            return model;
    }

    public String getRegNo() {
            return regNo;
    }

    public int getDeposit() {
            return deposit;
    }

    public int getRate() {
            return rate;
    }

}

public class TestProject {
    public static void main(String args[]) {
    ArrayList<Car> carlist = new ArrayList<Car>();
    carlist.add(new Car("Toyota", "Altis", "GJKFG457", 100, 60));
    carlist.add(new Car("Toyota", "Vios", "KDFJGK435", 100, 50));
    carlist.add(new Car("Nissan", "Latio", "DFGFD45", 100, 50));
    carlist.add(new Car("Murano", "Nissan", "DGFDG345", 300, 150));

    carlist.add(new Car("Honda", "Jazz", "GK4535443", 100, 60)); 
    carlist.add(new Car("Honda", "Civic", "GKDHFG45", 120, 70)); 
    carlist.add(new Car("Honda", "Stream", "JHD478BG", 120, 70)); 
    carlist.add(new Car("Honda", "Odyssey", "BHFHS47", 200, 150)); 
    carlist.add(new Car("Subaru", "WRX", "KJGHDFG78", 300, 200));
    carlist.add(new Car("Subaru", "Imprezza", "SJE8234K", 150, 80));
    Scanner input = new Scanner(System.in);
    System.out.print("Enter model to rent: ");
    String model = input.nextLine();
    for(Car s : carlist){
        if (model.equals(s.getModel())) {
            System.out.println("Model " + model + " is available");
            System.out.print("Enter number of days: ");
            int days = input.nextInt();
            System.out.println("****Details****");
            int cost = (days * s.getRate()) + s.getDeposit();
            System.out.println("Deposit DailyRate Duration TotalCost"); 
            System.out.println(s.getDeposit() + " " + s.getRate()+ " " + days + " " + cost);
            System.out.print("Proceed to rent?( y/n ): ");
            String dec = input.next();
            if (dec.equals("y")) {
                System.out.println("Enter Customer Name: "); 
                String name = input.next(); 
                System.out.println("Enter IC Number: ");
                int num = input.nextInt();
                System.out.println("***Receipt****");
                System.out.println("Name ICNo Car RegNo Duration TCost");
                System.out.println(name + " " + num + " " + model + " " + s.getRegNo() + " " + days + " "+cost);
                System.out.println("Serving Next Customer ");
                } 
                else if (dec.equals("n")) {
                    System.out.println("Serving Next Customer: ");
                    } 
                    }
                    }
                    } 
                    }









Related Tutorials/Questions & Answers:
car rent system project
car rent system project  pl, may I get a source code in java with user inter face about car rent system. if it is possible pl help me.   ...("Enter model to rent: "); String model = input.nextLine(); for(Car s
student admission system project
student admission system project  College Student Admission System Project in Java Front End -JAVA Back End - MS Access Hello Sir, I want College Student Admission Project in Java with Source code, that includes Following Forms
Advertisements
project for Student Admission System
project for Student Admission System  I want Mini Java Project for Student Admission System. actually i want 2 know how 2 start this...please show me my way
Online Test System Project
Online Test System Project  I want a full ready-made project on online test system in jsp. i am not using servlet but only jsp.And backend database as mysql.   Please visit the following links: http
Online Test System Project
Online Test System Project  I want a full ready-made project on online test system in jsp. i am not using servlet but only jsp.And backend database as mysql. my email address is help me. send a full project on online test system
online project tracking system
online project tracking system  hello sir , I chintan patel and my question is as under how to assign project for admin to project manager in jsp servlet project my project name is "online project tracking system " and i am
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
Rent dedicated servers
Rent dedicated servers  Hi, I have two choices for dedicated hosting: a) rent dedicated servers (adsbygoogle = window.adsbygoogle... and just looking for dedicated server hosting your website then you just rent
online examination system project in jsp
online examination system project in jsp  How many tables are required in SQL for online examination system project in jsp in java my email id
online examination system project in jsp
online examination system project in jsp  How many tables are required in SQL for online examination system project in jsp in java
online examination system project in jsp
online examination system project in jsp  How to show the status bar which shows how much time is remaining in online examination system in jsp.my
ModuleNotFoundError: No module named 'project-system'
ModuleNotFoundError: No module named 'project-system'  Hi, My... named 'project-system' How to remove the ModuleNotFoundError: No module named 'project-system' error? Thanks   Hi, In your python
online examination system project in jsp
online examination system project in jsp  How many and which data tables are required for online examination system project in jsp in java. please give me the detailed structure of each table
ModuleNotFoundError: No module named 'rent-a-bot'
ModuleNotFoundError: No module named 'rent-a-bot'  Hi, My Python... 'rent-a-bot' How to remove the ModuleNotFoundError: No module named 'rent... have to install padas library. You can install rent-a-bot python
Java project in online examination system
Java project in online examination system  how many and which tables are required at backend as SQL for online examination system project in jsp
online examination system project in jsp
online examination system project in jsp  thanks for providing me 6 tables for online examination system. I want to know what will the id field of Answers1 table contain? Will it contain same id for all the questions of Set1 &
online examination system project in jsp
online examination system project in jsp  thanks for providing me 6 tables for online examination system. I want to know what will the id field of Answers1 table contain? Will it contain same id for all the questions of Set1 &
online examination system project in jsp
online examination system project in jsp  Thanks for providing me the 6 tables.But I want to know will the id field of answers1 table be same for all questions of Set1? Will it be 1 or will be 1,2,3,... What
Rental Car Application
to rent: "); String model = input.nextLine(); for(Car s : carlist...Rental Car Application   Hi every java master i'm new java beginner and i have to try test one Rental car Application but i can't run it in below
Rental Car Application
Rental Car Application   Hi every java master i'm new java beginner and i have to try test one Rental car Application but i can't run it in below... import java.util.*; class Car { private String make; private
online examination system project in jsp
online examination system project in jsp  I am doing project in online examination system in java server pages. plz send me the simple source code in jsp for online examination system
online examination system mini project
online examination system mini project  i developed a project on online examination system using jsp and java script . I am getting the quetion... in finding out that..only that part had left for my project completion.please help me
ModuleNotFoundError: No module named 'dreamship-rent-division'
ModuleNotFoundError: No module named 'dreamship-rent-division'  Hi...: No module named 'dreamship-rent-division' How to remove the ModuleNotFoundError: No module named 'dreamship-rent-division' error? Thanks   
i-election voting system project in java
i-election voting system project in java  I want source code and documentation project in java. send
sir plz send the project on quiz system code
sir plz send the project on quiz system code  sir plz send the client server based project in core java database in my sql
Project on mailing system using Java/JSP
Project on mailing system using Java/JSP  I am making a project on mailing system in Java/JSP. How could I display the inbox messages on the home page of user? Please tell me about how to handle these messages in database
Best Vehicle Tracking System
, it involves even the lock system, car-parking assistance and accident alert system. This has become a vital part of day-to-day lives of people who use a vehicle... devices on the other hand assist the driver in car parking, lock system, door
Java Project for College Admission System - Java Beginners
Java Project for College Admission System  I want Project for Student Information System in Java Back end-MS Access plz Give Me source code or website to download it. plz Help Me
ModuleNotFoundError: No module named 'car'
ModuleNotFoundError: No module named 'car'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'car' How to remove the ModuleNotFoundError: No module named 'car' error
ModuleNotFoundError: No module named 'car'
ModuleNotFoundError: No module named 'car'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'car' How to remove the ModuleNotFoundError: No module named 'car' error
College Student Admission System Project in Java
College Student Admission System Project in Java   Front End -JAVA Back End - MS Access Hello Sir, I want College Student Admission Project in Java with Source code, that includes Following Forms 1) Student Admission based
GPS Car
Car Navigation System Have you ever settled behind the wheel of your car... (Global Positioning System) car navigation systems can show and even tell you... the system. Inexpensive systems simply plug in to your car's cigarette lighter
how to write jsps and databasetables,umldiagrams in fuelmanagement system project
how to write jsps and databasetables,umldiagrams in fuelmanagement system project  how to write jsps and databasetables,umldiagrams in fuelmanagement system project
Car Rental Application in Java
Car Rental Application in Java In this section, we are going to create a Java application regarding car renting, booking and checking the availability... no, rent rate on the basis of per day, and the amount to deposit in the arraylist
Delhi to Udaipur by car
Delhi to Udaipur by car  Hi, I'll drive my car from Delhi to Udaipur. So, please suggest me the shortest way... thanks
Java Project for College Admission System - Java Beginners
Java Project for College Admission System  Hello Sir I urgently wants College Admission Project in Java,with Back End Microsft Access 2007 ,sir plz Give me Full Source Code.  Could u give me the filed should
project on bank management system - Swing AWT
project on bank management system  plz give me code to move from by clicking a button on one panel to other panel and the add textfield and label such as name , address etc to second panel and textfield are one below to other
System
System  What is System in System.out.println() method? Is it a Class or a Package
book system
book system  i have a problem here..how can i make a system for borrowing books, which include members or non members category, books category, rent category, return category and buy category
How to insert a car in the picture, insert a car in the picture, insert a car
How to insert a car in the picture   ... and a car to insert.ADS_TO_REPLACE_1   ADS_TO_REPLACE_2 Paste: Copy the car picture and paste on the road picture as here. Decrease size: Press Ctrl
car licensing office
car licensing office  *A customer who wants to apply for getting a car license should provide information about the brand of the car... of the car, the request is sent to one of the employees. *After receiving all
car licensing office
car licensing office  *A customer who wants to apply for getting a car license should provide information about the brand of the car... of the car, the request is sent to one of the employees. *After receiving all
car licensing office
car licensing office  *A customer who wants to apply for getting a car license should provide information about the brand of the car... of the car, the request is sent to one of the employees. *After receiving all
ModuleNotFoundError: No module named 'my-car'
ModuleNotFoundError: No module named 'my-car'  Hi, My Python...-car' How to remove the ModuleNotFoundError: No module named 'my-car'... to install padas library. You can install my-car python with following command
ModuleNotFoundError: No module named 'demo-car'
ModuleNotFoundError: No module named 'demo-car'  Hi, My Python... 'demo-car' How to remove the ModuleNotFoundError: No module named 'demo-car... to install padas library. You can install demo-car python with following
ModuleNotFoundError: No module named 'my-car'
ModuleNotFoundError: No module named 'my-car'  Hi, My Python...-car' How to remove the ModuleNotFoundError: No module named 'my-car'... to install padas library. You can install my-car python with following command
ModuleNotFoundError: No module named 'car_package'
ModuleNotFoundError: No module named 'car_package'  Hi, My Python... 'car_package' How to remove the ModuleNotFoundError: No module named 'car_package' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'ddc-car'
ModuleNotFoundError: No module named 'ddc-car'  Hi, My Python...-car' How to remove the ModuleNotFoundError: No module named 'ddc-car... to install padas library. You can install ddc-car python with following command

Ads