FinalDocumentJava
FinalDocumentJava
After login, this dashboard allows vendors to manage their menu items and orders, view revenue
and orders, read customer feedback, and review notifications before logging out
\
Figure: Interface for managing the menu
After clicking the “Manage Menu” button, the “Manage Menu” window displays buttons for
adding, updating, deleting, and viewing items and provides an exit option. The user interface
serves as a basic platform for supervising menu elements in software systems.
This basic form allows vendors to add new items. Clicking ‘OK” completes the process after you
submit the item name (“Momos”) within the text box.
This basic form enables vendors to add descriptions to the items. You need to input the text (“it’s
delicious”) into the description field then press “OK”.
This form enables vendors to enter their item’s price of “150” while providing “OK” and
‘Cancel”. You can find this form under “Adding an item’s price”.
\
The system displays the notification “Item added successfully!” through its confirmation dialog
box and includes an “Ok” button for user interaction. The interface prompts users with an “OK”
button to confirm a successful action inside a software program.
Vendors can view the menu specifications which the menu items.
The update form functions as an easy interface to modify individual items. You need to type the
name of the update item (“momos”), then select “OK”.
Figure: Updating a new description
Vendors can update an item description by inserting the item’s name you want to update. Vendors
can enter the new description (“more Delicious”) before pressing “OK” on the screen.
The dialog box displays the user input of “120” for updating item pricing information. Vendors
can access software item detail updates through the ‘Ok” and ‘Cancel” buttons.
The updated information for “Momos – More Delicious ($120.0)” now appears in this section
after editing the menu item.
Vendors can enter item names to delete items through this interface. Type “momos” as the item
name into the delete box, then click OK.
Figure: Confirm the deleting process
The message “No items in the menu” in a dialog box confirms that removing items was
successful with an empty menu. The vendor can verify the message through the ‘OK” button.
The vendor observes pending orders through their Order Management System after a customer
submits their order. Vendors can decide between accepting or declining orders through their
system with customers.
Figure: Accept the order by clicking the accept button
The system displays this notification when the vendor selects the ‘Accept Order” confirmation to
approve order ID 1 from the customer.
The image presents Sujal’s order detail, which reveals a declined status as indicated by the order
selection dropdown.
After accepting their order, A Customer can view their order status through this notification
window. Each placed order automatically appears in this area, which displays the acceptance and
decline statuses.
1.3.3 Order History
Vendors can find their order history details after clicking the “Order History” option from the
main menu.
The business earns $500 daily and $15,000 monthly and $180,000 yearly through this revenue
dashboard.
1.3.5 Customer Reviews
Vendors have access to see the customer reviews about their orders received. Customers post
their reviews in this area following order information. The section allows vendors to measure
customer satisfaction and find opportunities to enhance their service.
2. Delivery Runner (Nischal Sharma)
Once login is complete, the delivery runner encounters a dashboard that combines options to see
tasks and updates status and review ratings and view earnings information. Delivery runners can
use the “Back to Login Page” button to perform their logout process. The dashboard supplies
essential resources to handle delivery operations.
2.2 Assign tasks to delivery runners
The displays show an automated delivery management interface for fleet management, which
distributes orders to designated delivery team members. Order 2 requires a delivery service,
which has been assigned to Nischal Sharma since he is currently the only available runner.
Orders 1 and 3 do not require delivery because their status indicates they are available for dine-in
or takeaway. The system verifies automatic order assignments while displaying order status
updates.
The system notifies customers with a message such as “Some orders couldn’t be assigned due to
a lack of delivery runners” when customers place an order for delivery, but there are no delivery
runners. Please select takeaway or dine-in. This guarantees a seamless experience despite the
delivery limits by informing the customer of the condition and enabling them to choose
alternative fulfillment option.
The display interface provides delivery runners with feedback from customers regarding their
orders. The system reveals to delivery runners information about what food items (Chaumin and
Momos) customers ordered together with delivery method (Dine-in or Delivery) and total price.
The reviews reveal to delivery runners the positive aspects that customers appreciate about
products and delivery times. The display enables delivery runners to understand which features
customers prioritize along with receiving guidance or providing top-quality service
Delivery Runners can find order information displayed on top before they click “Accept Task” to
officially signify their commitment towards completing the task.
The document displays the earned pay of a Delivery Runner. The report shows Nischal Sharma
as the delivery runner who earned Rs 150. The brief report displays the driver's current earnings.
3.1 Encapsulation
Figure: Encapsulation
In the Menu Items class, it ensures that data such as name, description, and price are concealed
by restricting their access through a private keyword. In turn, it gives other classes access
through other methods like getName() and setName(). This helps to defend the data and ensure
that the single responsibility principle for the menu item objects is maintained.
3.2 Polymorphisms
Figure: Polymorphisms
Your code provides an example for the use of polymorphism, or the ability to select the
appropriate user interface class, say CustomerUI or VendorUI. These classes derived from the
same present class and java determines which showUI() to call during execution. This makes
code modular, maintainable, and secure since additional roles can easily be incorporated without
altering primary login procedures.
3.3 Inheritance
Figure: Inheritance
This code uses inheritance to simplify the common setup of JFrame and minimize redundancy.
The BaseReviewFrame acts as the parent class, managint the window’s title, dimensions, and
Nimbus look and feel. The public class ReadReview extends BaseReviewFrame {} allows
ReadReview to inherit the properties of BaseReviewFrame while also incorporating its
components like JTextArea, reviewArea, and JButton. This method improves code
maintainability; any necessary changes to the UI setup can be made in BaseReviewFrame and
will automatically reflect in all business.
3.4 Abstraction
Figure: Abstraction
4. Additional Features
4.1 Password Requirements
This image displays a password validation error message. It indicates that the user's entered
password does not meet the required criteria: it must be at least 8 characters long and include at
least one number. The message is presented in a modal dialog box, titled "Error," with an "OK"
button to acknowledge and dismiss the message, prompting the user to re-enter a password that
adheres to the specified rules.
4.Appendix
4.1.1 Menu.txt
This text file displays food item information using one line for each entry which shows its
description and price. The new item added to the database receives its place as a new entry
within this single text file which serves to retain the item data.
4.1.2 Review.txt
The figure displays the Review.txt document that contains order information together with
customer reviews. The file contains one line for each customer order, which includes their name
as well as order status and ordered items alongside total price and review information. The file
functions as a basic database that maintains records of customer feedback together with order
history.
4.1.3 Task.txt
Figure: Text file of task
The image depicts the Task.txt file that tracks delivery operations. New tasks with order
information and assigned delivery runner are added to the file when customers request delivery.
The basic system enables effective tracking and management of delivery operations.
4.1.4 Vendors_notification.txt
The Vendors.txt file serves as a record of customer orders according to the image shown. The
system adds new order information to the Vendors.txt file for vendor notification with details of
order items and current status marked as 'Pending'. The file system enables vendors to monitor
and handle their new order requirements.
Customer notifications. Txtfile provides storage space for status notifications that customers get
about their orders whether they are accepted or declined.