Introduction to Java using NetBeans

Section 1.1 : An Introduction to NetBeans and Java

Learning Goals

We are Learning To ......

- create java applications in Netbean
- properly format java code
-format console output
- post assignments online

Success Criteria

What I'm Looking For......

- bug free java applications that efficiently solve the problems presented
- problem solving (try before you ask)
- efficient algorithm implementation
- formated and documented code
- organized website with code and executables

Curriculum Expectations

Programming Concepts and Skills
- demonstrate the ability to use different data types and expressions
- use proper code maintenance techniques when creating computer programs

Software Development
- manage the software development process effectively

What is Java?

JAVA is a high-level programming language developed by Sun Microsystems. Java was originally called OAK, designed for handheld devices, but was unsuccessful. In 1995 Sun changed the name to Java and modified the language to take advantage of the burgeoning World Wide Web.

Java is an object-oriented programming language. Object-oriented programming is a way of writing programs with the common theme that the program is a collection of objects that work together to perform the task at hand. Each object is a collection of data and methods that manipulate the data to perform required tasks. You will learn more about object-oriented programming as the course progresses.

Getting Started - Creating a Java Application in Netbeans

Open a New Project

Name the Project T1Formating and Set the Location to your N:Drive

Java Comment Statements

1. Multiple line comments

* This is an example of a multiple line comment
* that shows information over many lines. It begins with a
* slash and an asterisk and ends with an asterisk and a slash

2. Single line comments

// This comment type is used for short one line comments



Hello World




These assignments will be marked for code format, documentation (every line), and output format.

Assignment 1.1  BingoCard

Create a BingoCard application that displays a traditional bingo card with five columns of five unique numbers.  The column labels are B, I, N, G, O.  Column B contains numbers from 1 to 15, column I 16 to 30, column N 31 to 45, column G 46 to 60 and column O 61 through 75.

      B                  I                      N                     G                     O

      2                20                    42                    60                    64

    14                25                    32                    55                    70

      5                18                FREE                    53                    67

    12                16                    31                    46                    75

    10                22                    39                    59                    71

Assignment 1.2  Rectangle

            Create a Rectangle application that displays a rectangle of asterisks (*).  The rectangle should be 15  *  wide and 7 *  high.

You must use printf and not simple type a bunch of spaces.

*                          *
*                          *
*                          *
*                          *
*                          *

Assignment 1.3  TicTacToe

            Create an application that displays a tic-tac-toe board with an X in the center.

Assignment 1.4  GioPizza

            Create an application that displays the menu shown below.  (Note: You will be expanding on this assignment in a later section)

Gio's Pizza
                   (Slice)  (Sml)  (Med)
Cheese             5.00    7.50   10.00
Pepperoni          5.75    8.63   11.50
Combination        6.50    9.75   13.00
Meat Lovers        8.00   12.00   16.00



Posting your work

1. Upload the Java Projects to your Gravelle Folder (Share with me only) and insert the Drive Folder (Insert > Drive Folder)

2. Put your code into and save it in a google Doc in the Gravelle Folder

JAR files which are executable java files do not work on projects without a display so we will not use them in this assignment.

3. Take a screenshot of your console output and embed on your site