Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea

Phase 3 Application Screenshots 17

ITSD424

1803B-01

Object Oriented Application Development II

Famous Favorite Subs (Unit 3 IP)

Jacqueline Calloway

July 24, 2018

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 1

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 2

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 3

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 4

Use Case Customer Places order.

Main Actor: Customer
Details: Customer first selects his/her language preference then they select what they are having from the menu selection.
Ordering System: System is wireless and must me recharged at closing, the display is ready upon the customers arrival the user activates the menu by selection start.
Ordering Process:

  1. Customer selects his/her language preference

  2. Customer then selects the menu to get started

  3. Customer orders a drink from the drink menu

  4. Customer then selects what he/ she would like to eat

  5. Customer confirms order

Placing Wrong Order:

  1. Customer mistakenly orders an item when ordering they can press the back key to return to the previous menu.

  2. Customer enters wrong item and wants to return back to main menu.

Order Placed: Confirmed order is sent to the kitchen where it then is prepared.
Summary: User is familiar with how to enter values through mouse and has a general idea why the inputs are being provided and what is expect.

package famous.favourite.subs;

import java.awt.*;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.*;

public class FamousFavouriteSubs {

JFrame frame;//defining a frame in public class

public static void main(String[] args) {

FamousFavouriteSubs db = new FamousFavouriteSubs();

//Container myPane = frame.getContentPane();

}

public FamousFavouriteSubs(){

frame = new JFrame("FamousFavouriteSubs");

frame.pack();// to autosize the frame

frame.setVisible(true);

// what happen when the user clicks the close button

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

JButton button = new JButton("order Now");

button.addActionListener(new MyAction());

frame.add(button);

///Below code makes the frame size half the size of the computer screen

Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

int height = screenSize.height;

int width = screenSize.width;

frame.setSize(width/2, height/2);

// center the jframe on screen

frame.setLocationRelativeTo(null);

}

public class MyAction implements ActionListener{

public void actionPerformed(ActionEvent e){

// prompt thecustomer to enter their name

String name = JOptionPane.showInputDialog(frame, "Enter your name");

// prompt thecustomer to enter their delivery address

String adress = JOptionPane.showInputDialog(frame, "Enter your Address");

// prompt thecustomer to enter their favourite beverage

String beverage = JOptionPane.showInputDialog(frame, "Enter your favourite beverage");

// prompt thecustomer to enter their favourite sub bread

String sub_bread= JOptionPane.showInputDialog(frame, "Enter your favourite sub bread");

// prompt thecustomer to enter their favourite sub type

String sub_type = JOptionPane.showInputDialog(frame, "Enter your sub type");

showInputDialog();

JOptionPane.showMessageDialog(frame,

"Welcome \t"+name+" \tto"+

"\n****FamousFavouriteSubs****"+

"\n Your favourite selection in FamousFavouriteSubs include:\t"+

"\n SUB BREAD:\t"+sub_bread+

"\nFavourite Beverage:\t"+beverage+

"\nSUB TYPE:\t"+sub_type+

"\nSUB SIZE:\t"+showInputDialog()+

"\nYour favourites to be delivered to:\t"+adress+

"\n Thank for visiting us come again");

}

public String showInputDialog()

// prompt thecustomer to enter their favourite sub size

String inputValue = JOptionPane.showInputDialog("Enter sub size");

if(inputValue == null || inputValue.isEmpty() || inputValue.matches("[A-Za-z]*"))

{

JOptionPane.showMessageDialog(frame,"Enter only integer");

inputValue = showInputDialog();//call the fuction again until the condition is met

}

return inputValue;

}

Phase 2 Application Screenshots

Input Name:

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 5

Input Address:

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 6

Input Drink:

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 7

Input Bread:

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 8

Input Style:

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 9

Input Size:

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 10

Final Output:

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 11

Phase 3

Application Screenshots

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 12

Address input and Name input

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 13

Here chose Favorite beverage and key in Bread Details

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 14

Validation Field

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 15

Sub Size and Sub type

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 16

Output message

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 17

Clear the Filled Details

 Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and strea 18