Syllabus: WBIT 2311 Program and Problem Solving II - WBIT 2311 Spring 2008
|
| |
|
Course Description
|
| |
| |
|
Course Description
|
|
The emphasis of this course is on advanced programming techniques in Java including GUI's, software reuse through component libraries, recursion, event-driven programming, database processing, file processing, and exception handling. Students are able to create event-driven, graphical programs or text-based programs solving practical problems incorporating databases and external files.
|
|
|
Prerequisites
|
| |
| |
|
Prerequisites
|
|
WBIT 1310 Programming and Problem Solving I, WBIT 2300 Discrete Math for IT.
|
|
|
Course Objectives/Outcomes/Goals
|
| |
| |
|
Course Outcomes
|
|
Upon successful completion of this course, students will be able to:
- Implement event-driven GUI programs in Java
- Use Java’s exception handling mechanism
- Write simple multithreaded programs
- Access external information from a Java program (databases and files)
- Use Java collections framework
- Test and debug Java programs
- Build well engineered and maintainable Java programs to meet business organizational needs
|
|
| |
| |
|
Course Outlines
|
|
- GUI – Event Driven
- Error Handling / Exceptions
- Basic multithreading
- Files/DB Access
- Data Structures (stacks, queues, links, linked list)
- Algorithm Development
- Testing and Debugging
- Libraries
|
|
|
Textbook Information
|
| |
| |
|
|
Title
|
|
Introduction to Java Programming with JBuilder, 3/E
|
|
| |
| |
|
|
| |
| |
|
|
| |
| |
|
|
| |
| |
|
|
| |
| |
|
|
| |
| |
|
|
|
Optional References
|
| |
| |
|
|
|
|
Java in a Nutshell
David Flanagan
O'Reilly and Associates
4TH/2002
0-59-600283-1
Beginning Java 2
Ivor Horton
Wrox
2000
0-76-454365-2
Java 2: A Beginner's Guide
Herb Schildt
Mc Graw-Hill Osborne Media
1ST/2000
0-007-212742-2
|
|
|
Instructor Information
|
| |
| |
|
|
|
|
| Instructor Information |
| Name: |
Jeff Chastine |
| Email: |
Use BSIT email |
| Phone: |
678-466-4409 |
|
|
|
Instructor Contact Policy
|
| |
| |
|
Instructor Contact Policy
|
|
If you have personal/non-public questions, please send me an email. If you have programming/assignment questions, please post them to the discussion board so that others may benefit from them. I usually respond to posts and email within 24 hours, so please be patient and ask your questions as early as possible. I'm usually in my CSU office on MWF, so you can call or leave a message.
|
|
|
Policy on Changes to the Syllabus
|
| |
| |
|
Policy on Changes to the Syllabus
|
|
The professor reserves the right ot change the syllabus and class schedule, including assignments and tests with prior notice give to the class.
|
|
|
Class Cancellation Policy
|
| |
| |
|
Class Cancellation Policy
|
|
While class cancellation does not apply to an asynchronous online course, should instructional delays occur due to server or connection problems or other unforeseen circumstances, we will endeavor to remain on schedule. Such remedies may include adjustments to due dates, online discussion or tutoring sessions, etc.
|
|
|
Attendance/Participation
|
| |
| |
|
Attendance/Participation
|
|
All students enrolled in the WebBSIT Program must verify their enrollment via WebCT Vista.
Enrollment verification information is provided to the Financial Aid Office of your home institution. To verify your enrollment you must log-in to each of your WebCT Vista courses by 5:00 PM on the first day of course instruction.
Consistent participation is required. Activities include, e-mail correspondence, discussion threads and study groups, assignment submissions, etc.
http://www.webbsit.org/StudentPortal/enroll.asp
|
|
|
Withdrawal
|
| |
| |
|
Withdrawal
|
|
Withdrawal policy varies by institution. In general, students who stop attending class without doing the necessary withdrawal paperwork will receive an automatic grade of ‘F’. Students who withdraw after midterm will receive an automatic grade of ‘WF’. Withdrawal policy and procedures are published in the Academic Catalog of your consortium institution.
|
|
|
No-Show
|
| |
| |
|
No-Show
|
|
Students must log into each of their WebCT Vista courses by 5pm of the day classes begin (Academic Calendar) to confirm their attendance. Remember, you are taking an online course and participation in the course is the only way the instructor can "see" you.
If you fail to log into your courses by 5pm of the day classes begin, or fail to complete course activities within a two-week period at any time during the semester, the instructor will conseder your lack of activity as an indication of your intention not to continue in the course. At this point, the instructor may choose to remove you from group activities or interactions. Failure to participate without officially withdrawing from the course will result in a grade of F.
The special circumstances of taking a WebBSIT course demand regular and consistent participation. Be sure to pace yourself throughout the semester making sure your responses to communications and assignments are timely. If you are not able to participate in any assigned class activities, contact your instructor immediately.
A registered student, who has failed to attend class (in person or by electronic equivalent) by the final payment deadline for the term, is considered a “no show.” The “no show” student will be administratively withdrawn and will not be reinstated. The “no show” student is obligated to pay for all registration in effect at the end of drop-add even though he or she did not attend.
|
|
|
Academic Honesty
|
| |
| |
|
Academic Honesty
|
|
Unless otherwise indicated, all assignments, projects, examinations, etc are individual assessments and evidence of excessive collaboration between students will be treated as cheating. Note that representing the work of another is considered cheating. The usual penalty for cheating is an 'F' in the course.
Any student guilty of a dishonest academic activity such as (but not limited to ) copying sections from another student's paper or plagiarizing from another source such as a website will receive an F in this course.
For further information on Academic Dishonesty review that section of Academic Catalog of your consortium institution.
|
|
|
Technology Requirements
|
| |
| |
|
Technology Requirements
|
|
Technology Requirements
Computers located in on-campus labs or libraries cannot be used as the primary computer resource for taking online classes. You will need the reasonably small suite of hardware and software listed below
Required Hardware:
- Computer: A personal computer with Windows XP or higher, or a MacIntosh with OS 10.4.
- Sound: A sound card with speakers or headphones.
- Monitor: A VGA (or equivalent) or better monitor.
Strongly Recommended Hardware:
- Printer connected to the computer
- CD-ROM drive
- Microphone
Internet Connectivity:
- Internet access. For a dial-up connection, at least a 56k modem is recommended. Slower dial-up connections will affect course performance. High speed Internet connectivity (cable or DSL) is strongly recommended.
Required Software:
- Microsoft Office XP or beyond, including: Word, Excel, Access, PowerPoint
- Web Browser: A JavaScript enabled Web browser. These include Netscape 7.1, Internet Explorer 6.0 or newer versions of either. (Note: Internet Service Providers [ISP] with proprietary browsers such as Prodigy or some versions of AOL, may have difficulty with JavaScript-based activities. Contact the ISP to determine if the browser will work with JavaScript.)
- Virus protection software
- Flash Player
- Animations (Tutorials) used in this course require the installation of the cross-platform Flash Player.
|
|
|
Assessment Policies/ Overview of Grading/ Grading Scale
|
| |
| |
|
|
Quizzes
|
|
Each unit contains a quiz to be taken online. Your quiz average will be 5% of your total grade for this course. Check the course Calendar to determine the time to take the quiz. You are permitted (but not required) to take each quiz two times with the resulting average as your grade. Failure to complete a quiz during the designated time period will result in a grade of zero. Do not wait until the last minute to attempt your quiz.
|
|
| |
| |
|
|
Assignments
|
|
Each unit has an assignment that must be completed and submitted to your instructor. The assignments in this course are 15% of your total grade. Check the course Calendar to determine when your assignments are due.
|
|
| |
| |
|
|
Course Project
|
|
A Course Project is a required and consists of the assignments for Units 1, 2 and 7. These assignments will be collectively completed and submitted as the Course Project. This project will be 15% of your total grade.
|
|
| |
| |
|
|
Midterm Exam
|
|
The midterm exam is 30% of your grade for this course. It will be offered at a proctored site. This test will be taken with pencil and paper and will not be online. It will cover approximately 1/2 of the material of the course, though specific units will be posted on the discussion board. This is a mandatory exam for this course.
|
|
| |
| |
|
|
Final Exam
|
|
A final examination worth 35% of your final grade will cover all units in this course. This exam will also be offered at a proctored site. This test will be taken with pencil and paper and will not be online.
You will be required to include a rationale for your project design as part of the final. This rationale will be worth 30% of your final exam grade.
|
|
| |
| |
|
|
Grading Standard
|
|
A = 90 - 100%
B = 80 - 89%
C = 70 - 79%
D = 60 - 69%
F = 00 - 59%
PLEASE NOTE: Your final course grade can be no higher than one letter grade above your final exam and midterm average.
|
|
|
Assessment Deadline Policies (Late Work)
|
| |
| |
|
Assessment Deadline Policies (Late Work)
|
|
Assignments are due on the date that is posted (see the calendar). There is a grace period of 24 hours that the assignment will be still be accepted, though a late penalty will be applied. No assignment will be accepted later than 1 week after it is due, unless prior arrangements have been made. Work is not considered an excuse, so please start early! Also, please make sure you turn something in for me to grade - as I'll usually give partial credit where possible.
|
|
|
Proctored Exams
|
| |
| |
|
|
|
Unit 1 - Introduction to GUI Programming
|
| |
| |
|
|
| |
| |
|
|
Objectives
|
|
After completion of this unit, students should be able to:
- Explain the features of the Java graphics API
- Use
Color, Font and FontMetrics classes
- Use drawing methods in the
Graphics class
- Create frames, panels, and simple UI components
- Explain the features of common layout managers
- Use
FlowLayout, GridLayout, and BorderLayout managers
- Implement a basic grid-layout based application
|
|
| |
| |
|
|
Topics
|
|
- GUI – Event Driven
- Algorithm Development
- Testing and Debugging
- Libraries
|
|
| |
| |
|
|
Readings
|
|
Liang, Chapter 11
|
|
| |
| |
|
|
Assignments
|
|
Grid Layout
After you have completed this unit, you should have a general understanding of the layout managers in Java and how to add controls to a Java form. This assignment is the first in a series of assignments in which you will build an application to play music.
For this assignment, your task is to implement a basic grid-layout application. The application should consist of a form with the “grid” layout manager. To this form, add 128 buttons; these buttons should each have a distinct label - the numbers sequentially from 0 to 127. Your grid should be 16 buttons in width and 8 buttons in height – resulting in a 16x8 2-dimensional grid of buttons.
|
|
|
Unit 2 - Create User Interface and Event-Driven Programming
|
| |
| |
|
|
| |
| |
|
|
Objectives
|
|
After completion of this unit, students should be able to:
- Describe principles of good Graphical User Interface (GUI) design
- Explain the basics of event-driven GUI programming
- Construct GUIs using Swing components
- Utilize buttons, labels, lists, text fields, panels, message dialog boxes and menus
- Implement programs that handle mouse and keyboard events
- Use standard event adapters
- Use anonymous event adapters
- Create a multi-windowed application
|
|
| |
| |
|
|
Topics
|
|
- GUI - Event Driven
- Algorithm Development
- Testing and Debugging
- Libraries
|
|
| |
| |
|
|
Readings
|
|
Liang, Chapters 12 and 13
|
|
| |
| |
|
|
Assignments
|
|
Responding to Events
In this assignment, you are tasked to extend your application from the first assignment (Grid Layout) such that the buttons respond to click events and key presses are handled. When completed, this assignment will allow you to play music on your computer.
Implement an event-driven application that invokes a handler when the button is pressed. This handler should assign an “active instrument” property such that clicking a button selects the MIDI instrument associated with the numeric label of the button that was pressed (i.e. if the user presses the “82” button, then the active instrument will be set to 82). You may find it useful to convert the string of the button’s label to an integer.
Additionally, your application should respond to key press events. Your KeyListener event handler should play a MIDI note (pitch defined by key pressed) using a sound bank based upon “active instrument” (defined by the buttons above) using the General MIDI Standard (ex. 0 = acoustic piano, 14 = xylophone, 25 = acoustic guitar, etc.).
The synthesizer class is provided, so your application should reference it and make use of it (i.e. you don’t have to write this class).
|
|
|
Unit 3 - Applet and Advanced Graphics
|
| |
| |
|
|
| |
| |
|
|
Objectives
|
|
After completion of this unit, students should be able to:
- Explain Java Virtual Machine and platform independence
- Develop and deploy applets via the
applet/object tag
- Use
init, start, stop, and destroy methods in creating applets
- Pass parameters from HTML pages to applets
- Implement an applet that displays complex, user-defined graphics
|
|
| |
| |
|
|
Topics
|
|
- GUI – Event Driven
- Algorithm Development
- Testing and Debugging
- Libraries
- HTML
|
|
| |
| |
|
|
Readings
|
|
Liang, Chapter 14
|
|
| |
| |
|
|
Assignments
|
|
Applets and Graphics
In this assignment, you are tasked to build an applet in Java that displays your name.
Create an applet that displays your name using the drawLine and drawArc methods. The name that you write must be made from individual lines, circles, and arcs. If one of the characters naturally has a curve in it, then use a circle/arc (i.e. don't draw a square for the letter O). The following lower case letters have arcs/circles in them: "a b c d e f g h j m n o p q r s u y" - as do the following upper case letters: "B C D G J O P Q R S U".
If your name is longer than 5 characters, you are only required to do the first five. If your name is less than 5 characters, then you're in luck. If you're name is Garry and people call you "G", then you must write the full name Garry. In other words, you only get out of work if your name is "Bob", "Pat", "Ken", etc... (Notice all these have arcs in them though).
Just as you would normally do, the first letter of your name should be capitalized, but all other characters should be lower-case.
|
|
|
Unit 4 - Exception Handling
|
| |
| |
|
|
| |
| |
|
|
Objectives
|
|
After completion of this unit, students should be able to:
- Explain the need for error and exception handling in programming
- Describe the exception class hierarchy
- Define and throw exceptions in a method
- Use the
try-catch block in exception handling
- Create user-defined exception classes
- Release resources using finally clause
- Implement an exception-handling console application
|
|
| |
| |
|
|
Topics
|
|
- Error Handling / Exceptions
- Algorithm Development
- Testing and Debugging
- Libraries
|
|
| |
| |
|
|
Readings
|
|
Liang, Chapter 15
|
|
| |
| |
|
|
Assignments
|
|
Exception Handling
Most of us have played the “high-low” guessing game wherein one player picks a number and the other player tries to guess what the number is; in this game, if the guessing player guesses less than the number, then the other player responds “too low,” and if the player guesses more than the number, then the other player responds “too high.” This keeps going until the guessing player correctly guesses the number.
Your task in this assignment is to implement such a guessing game using exceptions. Implement an exception-handling console application with the following:
- Program generates random number that user tries to guess
- User enters guess
- Program generates “tooHigh”, “tooLow” or “correct” exception
- Exception handler prints appropriate response to user and repeats until the user makes the correct guess
|
|
|
Unit 5 - Multithreading
|
| |
| |
|
|
| |
| |
|
|
Objectives
|
|
After completion of this unit, students should be able to:
- Explain multithreaded programming and its function
- Explain the life cycle of a thread
- Use thread priorities
- Create, control and destroy threads
- Implement a multithreaded program
- Explore multithreading with a simple console application
|
|
| |
| |
|
|
Topics
|
|
- Basic multithreading
- Algorithm Development
- Testing and Debugging
- Libraries
|
|
| |
| |
|
|
Readings
|
|
Liang, Chapter 18
|
|
| |
| |
|
|
Assignments
|
|
Multithreading “Racers”
Now that you’ve completed the unit on multithreading, you know the basics of how to create and run thread-based classes. This assignment allows you to practice multithreading programming.
Your task in this assignment is to create a threaded class that “races” by counting and displaying the numbers from 1 to 10000. Each of the instances of this thread class should have a unique ID (i.e. the first instance should be numbered “1”, the next instance should be numbered “2”, etc.).
Now that you have your threaded class, write a main/driver class that instantiates/spawns 10 instances of your threaded class and runs each of them. When the first thread completes and returns, invoke System.exit() to terminate the program; in so doing, you will be able to determine which thread “won” and achieved it’s conclusion first.
|
|
|
Unit 6 - Data Structures
|
| |
| |
|
|
| |
| |
|
|
Objectives
|
|
After completion of this unit, students should be able to:
- Describe the Java Collection Framework hierarchy
- Use basic Java collection data structures
- Select an appropriate data structure for an application
- Explain serialization of objects
- Implement a stack structure
|
|
| |
| |
|
|
Topics
|
|
- Data Structures (stacks, queues, lists, maps)
- Algorithm Development
- Testing and Debugging
- Libraries
|
|
| |
| |
|
|
Readings
|
|
Liang, Chapter 17
|
|
| |
| |
|
|
Assignments
|
|
A Stack of “Sausage”
The objective of this assignment is to allow you to work with the Stack data structure and explore the idea of first-in, last-out (FILO) servicing.
Imagine that you're visiting a local all-you-can-eat breakfast bar; among the many items on the bar is a pan of sausages. Your task is to simulate the sausage pan. Note that when new sausages are added to the pan, they're always added to the top (the worker just dumps new sausages on top of the old sausages); also note that whenever someone takes a sausage to eat, they pick the top-most sausage. Thus we've got a stack (first-in, last-out) and the bottom-most sausage is always the oldest. For sake of simplicity, imagine that the pan only allows you to select a "top" sausage (i.e. you can't pick among many).
Your task is to utilize a stack collection (the Stack or Vector class is appropriate). Your program should allow the user to add a sausage, remove a sausage, and print the status of the stack. The stack should store the time in which the sausage was added; and when a sausage is removed, the program should display how long the sausage "lived" in the pan (i.e. the difference from now to when it was added to the pan).
Important items to consider:
Don't allow the user to remove (pop) a sausage if the pan is empty
Displaying the status of the stack should show how many sausages are in the stack and the "age" of the topmost sausage
Use the Stack or Vector class to make your job a LOT easier (otherwise, you must implement the stack class yourself).
To get the time in Java, import java.util.* and then make use of the Date class.
|
|
|
Unit 7 - File Access
|
| |
| |
|
|
| |
| |
|
|
Objectives
|
|
After completion of this unit, students should be able to:
- Describe the Java streams class hierarchy
- Create input and output streams
- Read from or write to external files using file streams
- Use
File class
- Use
JFileChooser dialog to access files and directories
|
|
| |
| |
|
|
Topics
|
|
- Files/Database Access
- Algorithm Development
- Testing and Debugging
- Libraries
|
|
| |
| |
|
|
Readings
|
|
Liang, Chapter 16
|
|
| |
| |
|
|
Assignments
|
|
File Input and Output
The objective of this assignment is to allow you to work with external files and streams via the File and JFileChooser dialog.
Returning to your MIDI playing program that you wrote in assignments 1 and 2, your task in this assignment is to add “record” and “playback” functionality by writing and reading the song the user creates.
First, add three buttons to the application: “record”, “stop recording”, and “playback”. When the user presses the “record” button, the application should ask them to what file he/she would like to save the song (i.e. ask for a filename); the application should then write instrument and note information each time the user changes the instrument and plays a note. When the user presses the “stop recording” button, the open file being written to should be closed and no further note or instrument information should be written to the file. When the user presses the “playback” button, the application should present the user with a JFileChooser dialog allowing the user to select a data file to open; once selected, this file should be opened and the instrument and note information should be read in and replayed.
Note that this assignment asks you to create your own file format – so don’t feel compelled to write MIDI files per se. It is perfectly acceptable (and appropriate) for you to devise some file format to store the instrument change and note play information specific to this application.
|
|
|
Unit 8 - Database Access
|
| |
| |
|
|
| |
| |
|
|
Objectives
|
|
After completion of this unit, students should be able to:
- Create SQL commands
- Describe Java Database Connectivity (JDBC)
- Connect to and query databases using JDBC
- Connect to and update databases using JDBC
- Implement a GUI program using JDBC
|
|
| |
| |
|
|
Topics
|
|
- Files/DB Access
- Algorithm Development
- Testing and Debugging
- Libraries
|
|
| |
| |
|
|
Readings
|
|
Liang, Chapter 22
|
|
| |
| |
|
|
Assignments
|
|
Database Access
The objective of this assignment is to allow you to work with JDBC via an ODBC-connected Access database.
Your first task for this assignment is to locate and set up the “exampleMDB.mdb” file in the supplemental chapters section of the CD-rom that came with your Liang text. Copy this file to your hard drive. Next, create an ODBC connection to this database called “assignment8”.
Next, create a simple Java program that connects to this database using JDBC. Your program should then query this database’s “student” table and display a list of all the students’ names in alphabetic order (based upon last name).
If you implement your program correctly, this is the output you should see:
Rick R. Carter
Frank E. Jones
Joy P. Kennedy
Toni R. Peterson
Josh R. Smith
Jean K. Smith
George K. Smith
Jacob R. Smith
John K. Stevenson
Patrick R. Stoneman
Josh R. Woo
|
|
|
Important Dates
|
| |
| |
|
Important Dates
|
|
Spring Semester 2008
WebBSIT Term Calendar
First Day Students May Log into Vista Courses 3-Jan
Classes Begin 7-Jan
Students Must Log Into Course to Confirm Attendance for Financial Aid 7-Jan
Drop/Add 7-9 Jan
Last Day for Students to request alternate proctored exam sites 18-Jan
Contact Testing Center to schedule proctored exams for each course 18-Jan
Midterm exams 13-15 Feb
Midpoint Date Last Day for Students to Withdraw with a grade of "W" 25-Feb
Online course evaluation period begins 17-Mar
Online course evaluation period ends 2-Apr
Classes end 11-Apr
Final Exams 14-16 Apr
|
|