Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Fixed In project main file #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Hotel-Management-Project-Java-master.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Binary file added backup
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
21 changes: 21 additions & 0 deletions out/production/Hotel-Management-Project-Java-master/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Shourya Jaiswal

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file not shown.
16 changes: 16 additions & 0 deletions out/production/Hotel-Management-Project-Java-master/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Hotel-Management-OOP-Project

This is a Hotel Management tool which can be used to manage
activites like storing customer details, booking rooms of four different types, ordering food
for particular rooms, unbooking rooms and showing the bill. It can also be used to see
different room features and room availibility. It is a menu driven program and it runs until
the user exits. File handling has been used to store the current status of the
hotel(customer details, booked rooms, food ordered) in a file once the program exits so
that when we restart the program, the old details are not lost. The program reads the file
when it restarts to know the previous status of the hotel. Writing of file has been done in a
separate thread as it can be done parallely. User defined exception is thrown if the user
tries to book an already allotted room. Exception handling is properly done to deal with any
kind of unexpected exception.
##### Topics Covered-
Classes and Objects, Inheritance, File Handling with Objects, ArrayList, implementing
Interface, User defined exception and Exception handling.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-slate
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 5 additions & 5 deletions Project.java → project/Project.java
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static void bill(int rn,int rtype)
System.out.println("===============");
System.out.println("Item Quantity Price");
System.out.println("-------------------------");
for(Food obb:hotel_hotel_ob.deluxe_singleerrom[rn].food)
for(Food obb:hotel_ob.deluxe_singleerrom[rn].food)
{
amount+=obb.price;
String format = "%-10s%-10s%-10s%n";
Expand Down Expand Up @@ -486,8 +486,8 @@ class write implements Runnable
public void run() {
try{
FileOutputStream fout=new FileOutputStream("backup");
objectOutputStream oos=new ObjectOutputStream(fout);
oos.writeObject(ob);
ObjectOutputStream oos=new ObjectOutputStream(fout);
oos.writeObject(hotel_ob);
}
catch(Exception e)
{
Expand All @@ -498,7 +498,7 @@ public void run() {

}

public class Project3 {
public class Project {
public static void main(String[] args){

try
Expand All @@ -508,7 +508,7 @@ public static void main(String[] args){
{
FileInputStream fin=new FileInputStream(f);
ObjectInputStream ois=new ObjectInputStream(fin);
Hotel.ob=(holder)ois.readObject();
Hotel.hotel_ob=(holder)ois.readObject();
}
Scanner sc = new Scanner(System.in);
int ch,ch2;
Expand Down