-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbot.js
More file actions
19 lines (14 loc) · 676 Bytes
/
bot.js
File metadata and controls
19 lines (14 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const prompt = require('prompt-sync')();
function simulateBooking() {
let name = prompt('Enter your name: ');
let type = prompt('Choose restaurant type (Fine Dining / Casual): ');
let date = prompt('Enter booking date: ');
let time = prompt('Enter booking time: ');
let guests = prompt('Enter number of guests: ');
let restaurant = type === "Fine Dining" ? new FineDining("La Table", "123 Boulevard", "French", "Formal") : new Restaurant("Joe's Diner", "456 Main St", "American");
let booking = new Booking(name, date, time, guests);
restaurant.describe();
booking.bookingDetails();
}
simulateBooking();
module.exports=simulateBooking;