Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

RealEstateSystem.pdf OR HotelBookingSystem.pdf (Team Project - not more than 2-3

ID: 3775820 • Letter: R

Question

RealEstateSystem.pdf   

OR

HotelBookingSystem.pdf

(Team Project - not more than 2-3 students per team)

Posted: November 13

Final Submission:November 30

Project Deliverables. pdf

Evaluation_Sheet.pdf

Phase 1 :  Requirements Specification– November 21 (printed and stored on my pen drive)

Phase 2 : Design Specification-   November 23 (printed and stored on my pen drive)

Phase 3 : Test Plan – November 28 (printed and stored on my pen drive)

Phase 4 :  Source Code –   November 30 (printed and stored on my pen drive)

Phase 5 :  Test Cases and Results - November 30 (printed and stored on my pen drive)

Final Submission: (print all revised above documentation, revised source code including test cases and outputs; store on my pen drive the whole final submission including the exe file)

Submission Rules are the same as for the Homeworks.

GUIs and using databases are required for this project. You have to store the complete project including source code, GUI, databases, user guide and your .exe file on my pen drive.

Print everything else except GUI code.

Explanation / Answer

package Hotel;

import java.io.*;

public class Hotel {

Room[][] room=new Room[5][5];

    private class Item {

        String name;

        double price;

        int quanta;

        boolean avail;

    public Item (String n, double c, int q) {

        this.name=n;

        this.price=c;

        this.quanta=q;

        this.avail =true;

        this.checkAvail();

    }

    public void checkAvail() {

        if (this.quanta==0) {

            this.avail=false;

        }

    }

    public boolean isAvail() {

        return this.avail;

    }

}

    private class Room {

        String name, num;

        boolean avail, isSingle;

    public Room(String n) {

        this.name=n;

    }

    public String getNum() {

        return this.num;

    }

}

    public static void init() {

        for (int a=0;a<5;a++) {

            for (int b=0;b<5;b++) {

                room[a][b].avail=true;

                room[a][b].num=(a+1)+"0"+(b+1);

                if (b<=3) {

                    room[a][b].isSingle=true;

                } else {

                    room[a][b].isSingle=false;

                }

            }

        }

    }

    public static void menu()throws IOException {

        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

        System.out.println(" Taj Hotel");

        System.out.println(" _________ ");

        System.out.println("1) Make a Reservation ");

        System.out.println("2) Hotel Shop ");

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

        byte ch1;

        do {

            ch1=Byte.parseByte(br.readLine());  

        }while(ch1<1 && ch1>3);

        switch(ch1) {

            case 1:

                System.out.println("Making a new Reservation");

            break;

            case 2:

                System.out.println("Going to Hotel Shop");

            break;

            case 3:

                System.exit(0);

            break;

        }

    }

    public static void main(String[] args)throws IOException {

        init();

        for (;;)/> {

            menu();

        }

    }

}