Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RestaurantBookingSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sultan.khalifa
RestaurantBookingSystem
Commits
59cb607f
Commit
59cb607f
authored
Nov 09, 2020
by
Sully Khalifa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New
parent
9d253063
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
158 additions
and
0 deletions
+158
-0
.classpath
RestaurantBookingSystem/.classpath
+10
-0
.gitignore
RestaurantBookingSystem/.gitignore
+1
-0
.project
RestaurantBookingSystem/.project
+17
-0
org.eclipse.jdt.core.prefs
RestaurantBookingSystem/.settings/org.eclipse.jdt.core.prefs
+12
-0
RestaurantBookingSystem.java
RestaurantBookingSystem/src/RestaurantBookingSystem.java
+118
-0
No files found.
RestaurantBookingSystem/.classpath
0 → 100644
View file @
59cb607f
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
>
<attributes>
<attribute
name=
"module"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
RestaurantBookingSystem/.gitignore
0 → 100644
View file @
59cb607f
/bin/
RestaurantBookingSystem/.project
0 → 100644
View file @
59cb607f
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
RestaurantBookingSystem
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
RestaurantBookingSystem/.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
59cb607f
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
RestaurantBookingSystem/src/RestaurantBookingSystem.java
0 → 100644
View file @
59cb607f
import
java.util.ArrayList
;
import
java.util.Scanner
;
/*Algorithm
*
*
* Generic description of the items: name, code, price, quantity and description
Database for the products/items: has to reflects all these components of the items
Table for the cart, where a customer can store selected item before payment
Also the cart has to capture these components of the items.
Start
-0- Welcome to the restaurant message
-1- Customer initial input
Ask customer to enter their name
-2- Ask customer if they would like to choose a seat from the unassigned seats.
-3- Create two dimensional arrays (string) to display the seat layout
If seats are not assigned, assign the seat to customer else display "XX" to indicate that the assigned seat is no longer available.
-4- If seats are available, assign to customers else display "Sorry there is no available seat at this time".
-5- Display a list of available food
-6- interface where a customer can choose one of the following options:
select an item
remove an item from a basket
check out (for payment)
exit.
-7- Create a temp basket
-8- make a payment for selected basket items
enter amount for payment
clear basket.
-9- Confirmation displaying:
customer's name.
seat number
list of ordered items
total cost of the order.
-1- Login system
Ask user enter username and password
Take the username and password
Check if it is correct login
else show a message that invalid username or password.
-2- List of products: -method
Name Code Price
-3- Select a product
Ask the user to enter item code
Entering item code
Take the item code
Ask for the quantity
Check if it is available in the stock
if available add it to the cart
else show a message out of stock
-4- Show cart with the total
-- Expand this as a method
*
*/
public
class
RestaurantBookingSystem
{
public
static
void
main
(
String
[]
args
)
{
// A facility for getting input
static
Scanner
input
=
new
Scanner
(
System
.
in
);
// Generic description of the items: name, code, price, quantity and description
// Database for the products/items: has to reflects all these components of the items
// An array or list to represent the database, from Week 04
static
ArrayList
<
String
>
itemName
=
new
ArrayList
<
String
>();
// name
static
ArrayList
<
Integer
>
itemCode
=
new
ArrayList
<
Integer
>();
// code
static
ArrayList
<
Float
>
itemPrice
=
new
ArrayList
<
Float
>();
// price
static
ArrayList
<
Integer
>
itemQty
=
new
ArrayList
<
Integer
>();
// Quantity
static
ArrayList
<
String
>
itemDescription
=
new
ArrayList
<
String
>();
// Description
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment