COM321+(2011-12)

=COM321 - Introduction to Programming 2= ===Computer programming is a great skill to know - even if you are not going to be employed as a programmer. It helps build the logic portion of your brain and is helpful when you need to process information.===

Policies and Procedures

 * 1) ===This is a project-based class and effort is important. Think of it like art class. You must create some initial work before the art teacher can help you. Sitting with a blank canvas makes it difficult for the teacher to help.===
 * 2) ===Projects are graded using a simple rubric===
 * 3) ===A for projects that meet __all__ of the requirements __and__ include extra capabilities===
 * 4) ===A- for projects that meet __all__ of the requirements===
 * 5) ===B for projects that meet __most__ of the requirements===
 * 6) ===C for projects that meet __some__ of the requirements===
 * 7) ===Grades below a C are for incomplete projects and a lack of effort===
 * 8) ===Have fun and be creative===

Requirements
>
 * ===Download the Eclipse Java development tool (MacOS Cocoa64 version)===
 * ===Download the GameSalad game development tool===
 * ===Watch the following videos that introduce our programming tools===
 * ===Watch GameSalad introduction video===
 * ===Watch Eclipse Java introduction video===
 * ===Watch Java for Beginners video===
 * ===Watch Using the Debugger video===

Java Projects
>> >> === ===
 * ===Resources===
 * ===Online help for Eclipse Workbench and Java===
 * ===[|Workbench User Guide] (PDF)===
 * ===[|Java development user guide] (PDF)===
 * ===Java Examples===
 * ===Searchable Java Examples (courtesy of Sasha)===
 * ===Searchable Java Examples===
 * ===Searchable Java Examples===
 * ===Java language===
 * ===File input/output===
 * ===Search engine for Java examples===
 * ===Project 1 - Watch the "Hello World" video and create the application in Eclipse===
 * ===Project 2 - Create an application using integer, float, and boolean variables===
 * ===Part 1 - perform calculations using each type of variable===
 * ===Part 2 - convert between different types of variables (known as casting)===
 * ===Project 3 - Create an application using string variables:===
 * ===Part 1 - concatenate two strings===
 * ===Part 2 - compare two strings===
 * ===Part 3 - extract one character from a string===
 * ===Part 4 - explore length, indexOf, and substring methods===
 * ===extra credit: extract the middle word from "Computers are fun"===
 * ===Project 4 - Create an application using a FOR loop===
 * ===Part 1 - prints every fifth numbers from 1 to 100 (example: 1, 5, 10, 15, 20, 25, 30 ...)===
 * ===Part 2 - print every fifth number from 1 to 100, but __**only**__ if it is an even number (10, 20, 30 ...)===
 * ===Project 5 - Create an application using __**If**__ and __Switch__ logic===
 * ===Part 1 - determine the name of a football score based on points scored (1, 3, 7)===
 * ===Part 2 - rewrite the program from part 1 to use the Switch statement===
 * ===Part 3 - try the program on page 167 that uses two logical operators together===
 * ===Project 6 - Create a program to read a line of input from the keyboard===
 * ===Part 1 - find the length of the string that was typed===
 * ===Part 2 - determine if your first name was part of the string===
 * ===Project 7 - Create an application using an array (pg 283). Pretend you are running a small inn with 20 rooms.===
 * ===Part 1 - create a boolean array called bOccupied of size 200===
 * ===Part 2 - use the random function to assign bOccupied[i] true 20% of the time and false the other 80% of the time===
 * ===Part 3 - print out a report showing the rooms that are occupied (bOccupied[i] == true)===
 * ===Assessment 1 - Cash Register Application (hints on page 109)===
 * ===Write a program that calculates the change for a product that costs less than $10.00. Assume that the customer always pays with a $10.00 bill. For example, if the product costs $4.00, then the change is $6.00 ($10.00 - $4.00). The program should also calculate the coins and bills that the customer should receive.===
 * ===(1) read the price of a product cost (between $0.01 and $99.99) from the keyboard and convert it to a decimal number===
 * ===(2) read the amount given to pay for the product (between $0.01 and $100.00) and calculate the change owed (example: $10.00 - $7.37)===
 * ===(3) determine the bills and coins (example: dollars, quarters, dimes, nickels, and pennies)===
 * ===(4) the answer to the sample is $2.63===
 * ===two dollar bills===
 * ===two quarters===
 * ===one dime===
 * ===three pennies===
 * ===Project 8 - Create an application that uses objects===
 * ===Watch this introductory video on objects (link)===
 * ===Watch this introductory video on objects (link)===
 * ===Project 9 - Create a graphical application===
 * ===Download this tutorial on using the Eclipse Visual Editor ([|PDF])===
 * ===Watch this two-part tutorials on building a graphical application (video1, video2)===
 * ===Watch this video tutorial on building a graphical Java application===
 * ===Watch this video tutorial on adding actions to buttons===
 * ===Project 10a - Improve the Pong game.===
 * ===Play with the Gamesalad "Basic Table Tennis" game and review the behaviors. Pay particular attention to how new balls get launched.===
 * ===Download this Scratch Pong game (link)===
 * ===The game does not work perfectly. When a player misses the ball, it automatically starts a new ball into play.===
 * ===Improve the game in the following ways:===
 * ===so that a player needs to hit the space bar to launch a new ball===
 * ===the new ball should come from the paddle of the player who won the last point.===
 * ===the new ball should move at a random angle===
 * ===Project 10b - Build a tic-tac-toe game===
 * ===Create a tic-tac-toe game in Scratch, Gamesalad, or a tool of your choice.===
 * ===Your game will need the following logic:===
 * ===How to draw the board?===
 * ===How to get input from the user?===
 * ===How will you decide if there is a winner and the game is over?===
 * ===How will you decide where to go===
 * ===Hint: you may want to search the Internet for "tic-tac-toe logic" or look at the code from another programmer===

>> > > === ===
 * ===Final Project - Developing a GUI-based game using Eclipse===
 * ===We will build on our experience usign Eclipse and Java to create a GUI-based game.===
 * ===Download and install the WindowBuilder add-on for Eclipse===
 * ===Eclipse 3.5 (Galileo) - download WindowBuilder===
 * ===You will need to copy-and-paste the URL below into the "Install New Software" dialog box in Eclipse. The"Install New Software" command is located under the HELP menu.===
 * http://dl.google.com/eclipse/inst/d2wbpro/latest/3.5
 * ===The project is to take the logic you learned in project 10b and apply it to make a graphical version of Tic-Tac-Toe using Eclipse and Swing. Swing is a toolkit that helps great Java programs that have a graphical user interface (GUI). The Swing toolkit includes GUI components, such as table controls, list controls, tree controls, buttons, and labels, and basic user interface primitives, such as drag and drop, event handling, customizable painting, and window management. In addition, Swing supports numerous look and feels (i.e., Windows, OS/X, Java, Motif, etc).===
 * ===Java and Swing Resources===
 * ===Simple Swing tutorial (link)===
 * ===Swing tutorial with buttons and events (link)===
 * ===Swing tutorial with menus (link)===
 * ===Swing examples for each componnent, such as JFrame, JLabel, etc (link)===
 * ===Swing tutorials===
 * ===video1===
 * ===video2===
 * ===video3===
 * ===video4===
 * ===video5===
 * ===video6===
 * ===video7===
 * ===video8===
 * ===video9===
 * ===search for the other videos with this link===
 * ===Swing Tutorial ([|Word document] handy for copying-and-pasting code)===
 * ===Another Swing Tutorial ([|Word document] handy for copying-and-pasting code)===
 * ===The Tic-Tac-Toe game should include the following:===
 * ===download the user interface shell ([|file])===
 * ===create a new project in Eclipse===
 * ===create a package called ttt===
 * ===create a class called TicTacToe===
 * ===replace all of the automatically generated code with the file above (copy-and-paste)===
 * ===determine if there was a winner===
 * ===determine the computer move===
 * ===start with a random location===
 * ===add more sophisticated logic===
 * ===extra credit if you implement a drag-and-drop version with:===
 * ===drag and drop of X and O===
 * ===collision detection to make sure that the dragged X & O are landing on an empty spot===
 * ===alignment of dragged X & O to the spot after it is dropped===
 * ===drawing of a line through the 3 X's or O's when a player wins===