COM321+(2012-13)

=COM321 - Introduction to Programming 2=

Background
===This semester, we will take our knowledge of basic programming (e.g., variables, logic, loops, and arrays) and use them to write graphical applications. Graphical applications are more complicated than the command line (non-graphical) programs we wrote in COM311. Command line applications run sequentially and there is only one active path of logic. In a graphical application, ANY screen element can be clicked or selected at ANY time. This more dynamic class of programs are know as event-driven applications and they are complicated because the logic flow is based on user actions.===

Setup

 * ===(1) Make sure that you can access the "Java Essential Training" modules at Lynda.com.===
 * ===(2) Navigate to www.codechef.com and signup. Codechef provides a platform where you can compare yourself against other programmers to solve common problems. The problems range from easy to very challenging. Within each difficulty, you can sort the results by number of "Successful submission" to fine tune your level of challenge.===
 * ===(3) Review the online resources available (link), but you don't necessarily have to watch all the videos at the start of the course.===

=Projects= >>>
 * ===Project 1 - preparation for event-driven programs, it is necessary to review several concepts:===
 * ===project 1a - multiple class files===
 * Watch the video Organizing classes with packages under **9. Creating Custom Classes**(Lynda.com Java Essential Training)
 * Understanding encapsulation 5m 59s
 * Organizing classes with packages 6m 47s
 * ** Check ** --> Rewrite the Theater program from COM311 and split the code into two separate class files.
 * ===project 1b - error trapping===
 * Watch the four videos under chapter **7. Exception Handling and Debugging**(Lynda.com Java Essential Training)
 * Understanding compile-time vs. run-time errors
 * Handling exceptions with try/catch
 * Throwing exceptions in methods
 * Using the debugger
 * Take a look at this list of run-time exceptions
 * ** Check **--> Rewrite the Cash Register program from COM311 to trap an "Arithmetic Exception" and add a statement that divides a number by zero.
 * Optional --> Add your own custom error condition (see page 219 of //Java for Dummies//)
 * ===project 1c - making objects===
 * Review **Making Your Own Classes** (see chapter 2 on page 237 of //Java for Dummies//)
 * Watch all of the videos under (Lynda.com Java Essential Training)
 * Convert the eBook application to be object-oriented.
 * Recreate this program to learn about Java lists
 * You may want to consider the following methods:
 * setPage - sets the page content
 * getPage - retrieves the page conent
 * setBookmark
 * getBookmark
 * === project 1d - extending objects (classes) ===
 * Complete and extend the program in the Google Shared Document by ...
 * adding a color attribute
 * adding a construction class accepts the width and length as parameters
 * adding an area attribute
 * ===project 1e - array of objects===
 * ===Use this code to form the foundation for a blackjack game. You need to consider the following methods:===
 * dealCard - to get two cards
 * getHit - get one more card
 * getTotal - compute the value of the hand
 * isOver - see if value of hand is greater than 21
 * ===Project 2 - Creating GUI Applications.===
 * ===Background. 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).===
 * ===project 2a - Setting up Eclipse===
 * (2) Download and install the WindowBuilder add-on for Eclipse. See this video for a tutorial on adding the graphics module to Eclipse.
 * Eclipse 3.5 (Galileo) - download WindowBuilderYou 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.
 * []
 * ===project 2b - download resources===
 * Download a copy of the textbook we will use for this class
 * Download the code for the above textbook
 * ===project 2c - watch introductory videos===
 * ActionListener (#53)
 * Event handler (#54)
 * JButton part 1 (#62)
 * JButton part 2(#63)


 * ===Project 3 - Writing an eBook operating system===
 * ===project 3a - sketch out the user interface using your knowledge of existing graphical application elements: text box, button, tab, popup dialog box, list, combo box, etc.===
 * ===Create a graphical version of the eBook program from Com311.===


 * ===Project 4 (optional) - Creating a graphical calculator===
 * ===project 4a - Creating a simple calculator - video 1, video 2, video 3, video 4===
 * ===project 5b -===


 * ===Project 5 (optional) - Using the Google API===
 * ===project 5a -===

Java and Swing Resources
>> ===GUI Tutorial - video 1, video 2, video 3, video 4, video 5=== >> ===Swing examples for each component, such as JFrame, JLabel, etc (link)=== >>
 * ===Code conventions (link)===
 * ===Swing Examples and Code (link)===
 * ===Simple Swing tutorial (link)===
 * ===Swing tutorial with buttons and events (link)===
 * ===Swing tutorial with menus (link)===
 * ===Java GUI Resources===
 * ===Swing tutorials===
 * ===video1===
 * ===video2===
 * ===video3===
 * ===video4===
 * ===video5===
 * ===video6===
 * ===video7===
 * ===video8===
 * ===video9===
 * ===search for the other videos with this link===
 * ===Swing Tutorial ([[file:king-ms-edtech/Java Swing Tutorial.doc|Word document]] handy for copying-and-pasting code)===
 * ===Another Swing Tutorial ([[file:king-ms-edtech/Java Swing Source Code.doc|Word document]] handy for copying-and-pasting code)===
 * ===Java Swing examples (and other examples too)===
 * ===Java 2D Game Tutorials===