Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners car rent system project
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Dejene Nigusu
car rent system project
1 Answer(s)      2 years and 9 months ago
Posted in : Java Beginners


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


Advertisement
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
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
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
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
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 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 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 many tables are required in SQL for online examination system project in jsp in java my email id
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
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
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  How to show the status bar which shows how much time is remaining in online examination system in jsp.my
Rent dedicated servers
Rent dedicated servers  Hi, I have two choices for dedicated hosting: a) rent dedicated servers b) Buy and use co-location hosting service... website then you just rent a dedicate server and host your application. Your hosting
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
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  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
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
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
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
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
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
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
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
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
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
College Student Admission System Project in Java - Java Beginners
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
Advertisements
 

 

 

DMCA.com