Top-Rated Free Essay
Preview

I Like to 1321

Satisfactory Essays
459 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
I Like to 1321
Phase 3 – Individual Project Instructions
NetBeans Setup Tutorial
For this Individual Project you will use the existing NetBeans program you completed for Phase
2’s Individual Project.
Build Java Application Instructions
Type the new code given below into your NetBeans project. You will need to rearrange a couple of items. Please compare this to your NetBeans project from the prior phase to understand the updates and changes. This new coded incorporates the Control Statements covered in Phase 3, including the if(condition) statement and the switch(integral_expression) statement. Also included is a for loop (repetition statement). Pay close attention to these as you are typing them to help you understand how they work. If you do not follow the syntax exactly you will more than likely encounter errors. Again, be sure to replace all references to Pizzas-RUs with your Approved Company Name.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* Filename: pizzasrusphase3.java
* Created: 4/9/10 by Dr. Debby Telfer
*
* Purpose: To allow creation of a login if a new customer and to simply
* login if existing customer to allow and give them a customized greeting
* after introducing them to the Pizzas-R-Us online ordering system.
*/
package pizzasrusphase3; import javax.swing.*; public class Pizzas-R-Us { public static void main(String[] args) {
// declare and initialize variables
String openingMsg, nameInputMsg, customerName, nameOutputMsg, returnInputMsg, customerReturn, returnOutputMsg, greetingOutputMsg, outputMsg,
// display opening message and system introduction openingMsg1 = "*** W elcome to Pizzas-R-Us Online Ordering System *** \n\n"; openingMsg2 = "You are now able to order your pizza through our online "; openingMsg3 = "take-out order system. \n\n"; openingMsg4 = "The pizza types you can order are: ";

openingMsg5 = "Chicago, New York, or Hawaiian \n\n"; openingMsg6 = "The pizza sizes you can order are: "; openingMsg7 = "Small, Medium, and Large. \n\n";
JOptionPane.showMessageDialog(null, openingMsg);
// determine if they are a new or returning customer returnInputMsg = "Are you a returning customer (Enter y or n)? "; customerReturn = JOptionPane.showInputDialog( returnInputMsg ); returnYes = customerReturn.equalsIgnoreCase( "y" ); returnNo = customerReturn.equalsIgnoreCase( "n" );
// initialize return flag
// determine if new customer or returning customer switch(returnFlag) { case 1: loginMsg = "Please enter your Current username:"; userid = JOptionPane.showInputDialog(null, loginMsg); pwMsg = "Please enter your Current password: "; password = JOptionPane.showInputDialog(null, pwMsg); break; case 2: loginMsg = "Please enter your New username:"; userid = JOptionPane.showInputDialog(null, loginMsg); pwMsg = "Please enter your New password: "; password = JOptionPane.showInputDialog(null, pwMsg); break; default:
JOptionPane.showMessageDialog(null, invalidEntry); loginMsg = "Please enter your New username:"; userid = JOptionPane.showInputDialog(null, loginMsg); pwMsg = "Please enter your New password: "; password = JOptionPane.showInputDialog(null, pwMsg);
} //end switch
// get required customer name using dialog boxes nameInputMsg = "Enter your name: "; customerName = JOptionPane.showInputDialog( nameInputMsg );

// repeat until a name is entered or exit after 3 tries for (int i =1; i

You May Also Find These Documents Helpful

  • Powerful Essays

    Nt1310 Unit 1

    • 4209 Words
    • 17 Pages

    If two steps are indented at the same level, the uppermost statement is executed first. ans)All of the above…

    • 4209 Words
    • 17 Pages
    Powerful Essays
  • Satisfactory Essays

    code program

    • 317 Words
    • 2 Pages

    (Copy of source code) - Insert here a copy of your *.java source code text (copy and paste source code here, do not simply insert *.java files):…

    • 317 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Positional Notation: Quiz

    • 518 Words
    • 4 Pages

    a repetition of n times. If you put {n,m} it means it repeats a minimum of ‘n’ and the maximum of ‘m’…

    • 518 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    The program Pizza.java creates a class Pizza and defines methods to get and set variables in the class…

    • 436 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Hangman Script

    • 487 Words
    • 2 Pages

    3 ) echo "peguin" ;; 4 ) echo "awesome" ;; 5 ) echo "ubuntu" ;;…

    • 487 Words
    • 2 Pages
    Powerful Essays
  • Powerful Essays

    Case Study in Dell Computer

    • 2477 Words
    • 10 Pages

    1. Introduction....................................................................................................................................2 2. Company Profile ............................................................................................................................2 3. Project History and Development ................................................................................................3 3.1. Implementation....................................................................................................................4 3.2. Progress made......................................................................................................................4 3.3. Wipro’s approach for learning.............................................................................................4 4. Key outcomes and lessons learned................................................................................................5…

    • 2477 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    Geoserver Developer

    • 3041 Words
    • 13 Pages

    2.1 Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .…

    • 3041 Words
    • 13 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Bibliography: Sriganesh, Rima Patel, Gerald Brose and Micah Silverman. 2006. Mastering Enterprise JavaBeans 3.0. Wiley Publishing, Inc. Sun. 2006. Enterprise JavaBeans Specification Documentation 3.0 Final Release. Sun Microssystems. Available at: http://java.sun.com/products/ejb/docs.html. Tiwari, Shashank. 2006. “Migrating EJB 2.x applications to EJB 3.0.” JavaWorld Magazine . Available at: http://www.javaworld.com/javaworld/jw-08-2006/jw-0814-ejb.html. XDoclet. 2006. XDoclet2 User Documentation. SourceForge. Available at: http://xdoclet.codehaus.org/User+Documentation. Yuan, Michael Juntao. 2005a. “On the road to simplicity: JBoss 4.0 simplifies middleware development.” JavaWorld Magazine . Available at: http://www.javaworld.com/javaworld/jw-02-2005/jw-0221-jboss4.html. Yuan, Michael Juntao. 2005b. “Simplify enterprise Java development with EJB 3.0, Part 1.” JavaWorld Magazine . Available at: http://www.javaworld.com/javaworld/jw-08-2005/jw-0815-ejb3.html. Yuan, Michael Juntao. 2005c. “Simplify enterprise Java development with EJB 3.0, Part 2.” JavaWorld Magazine . Available at: http://www.javaworld.com/javaworld/jw-09-2005/jw-0912-ejb.html.…

    • 5508 Words
    • 23 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Passport Automation System

    • 2050 Words
    • 9 Pages

    In this login module, we can perform that that perform that enters into the login website for the different actors, and then fill for the can be done by the…

    • 2050 Words
    • 9 Pages
    Satisfactory Essays
  • Good Essays

    | IT CHECKS AFTER EXECUTING THE LOOP ONCE. IT IS KNOWN AS EXIST CONTROL LOOP.…

    • 7765 Words
    • 32 Pages
    Good Essays
  • Good Essays

    Ns2 Installation

    • 1734 Words
    • 7 Pages

    The original tutorial can be found at netbeans.org. All credits must go to the original authors. In this tutorial we try to refine all the steps to more details using screen shots.…

    • 1734 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    Core Java Vol Ii 8th Ed.

    • 21466 Words
    • 86 Pages

    Core Java Volume II-Advanced Features, Eighth Edition - Graphically Rich Book ....................... 1 Table of Contents ................................................................................................................................................................................. 2 Copyright ..................................................................................................................................................................................................... 5 Preface .......................................................................................................................................................................................................... 7 Acknowledgments ............................................................................................................................................................................. 10 Chapter 1. Streams and Files .................................................................................................................................................. 11 Streams ................................................................................................................................................................................................ 22 Text Input and Output .................................................................................................................................................................... 33 Reading and Writing Binary Data ............................................................................................................................................. 43 ZIP Archives ....................................................................................................................................................................................... 51 Object Streams and Serialization…

    • 21466 Words
    • 86 Pages
    Satisfactory Essays
  • Powerful Essays

    References: |Single |Store floating point value in the range of (-3.4x10-38) - (+ 3.4x1038) |…

    • 6743 Words
    • 27 Pages
    Powerful Essays
  • Satisfactory Essays

    Netbeans User Guide

    • 142475 Words
    • 570 Pages

    NetBeans in a Nutshell ................................................................................................................................................ 1.Introduction.................................................................................................................................................... Is NetBeans For You? .............................................................................................................................. 1 Is This Book For You? ............................................................................................................................. 2 NetBeans and Java ................................................................................................................................... 2 What are Java Beans? ..................................................................................................................... 2 The Core Concept of NetBeans ...................................................................................................... 3 NetBeans as the "Visual JDK" ................................................................................................................. 4 All The Usual Features ................................................................................................................... 4 NetBeans as a tools platform ................................................................................................................... 5 NetBeans as an open source community .................................................................................................. 6 A Steady Stream of Creativity ........................................................................................................ 6 Don 't Be Cross That This Book Is Cross-Platform ........................................................................ 6 Contents of the Accompanying Sources…

    • 142475 Words
    • 570 Pages
    Satisfactory Essays
  • Good Essays

    bca qstn

    • 1776 Words
    • 8 Pages

    6. Conditional operator (?:) is a handy operator which acts like a shortcut for ---------a. if else statement…

    • 1776 Words
    • 8 Pages
    Good Essays

Related Topics