Skip to content

Commit fae7a17

Browse files
authored
Update and rename Project.java to Main.java
1 parent 4c1ff13 commit fae7a17

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Project.java renamed to Main.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
package project;
21
import java.io.File;
32
import java.io.FileInputStream;
43
import java.io.FileOutputStream;
@@ -342,7 +341,7 @@ static void bill(int rn,int rtype)
342341
System.out.println("===============");
343342
System.out.println("Item Quantity Price");
344343
System.out.println("-------------------------");
345-
for(Food obb:hotel_hotel_ob.deluxe_singleerrom[rn].food)
344+
for(Food obb: hotel_ob.deluxe_singleerrom[rn].food)
346345
{
347346
amount+=obb.price;
348347
String format = "%-10s%-10s%-10s%n";
@@ -486,8 +485,8 @@ class write implements Runnable
486485
public void run() {
487486
try{
488487
FileOutputStream fout=new FileOutputStream("backup");
489-
objectOutputStream oos=new ObjectOutputStream(fout);
490-
oos.writeObject(ob);
488+
ObjectOutputStream oos=new ObjectOutputStream(fout);
489+
oos.writeObject(hotel_ob);
491490
}
492491
catch(Exception e)
493492
{
@@ -498,7 +497,7 @@ public void run() {
498497

499498
}
500499

501-
public class Project3 {
500+
public class Main {
502501
public static void main(String[] args){
503502

504503
try
@@ -508,7 +507,7 @@ public static void main(String[] args){
508507
{
509508
FileInputStream fin=new FileInputStream(f);
510509
ObjectInputStream ois=new ObjectInputStream(fin);
511-
Hotel.ob=(holder)ois.readObject();
510+
Hotel.hotel_ob=(holder)ois.readObject();
512511
}
513512
Scanner sc = new Scanner(System.in);
514513
int ch,ch2;

0 commit comments

Comments
 (0)