close this window -...
TRANSCRIPT
Close this window Syllabus: WBIT 1310 Programming and Problem Solving I - Cheryl Garvin - Spring 2009
Section Information: Cheryl Garvin - Spring 2009 Course Name WBIT 1310 Programming and Problem Solving I Course Description
This course helps students to develop basic problem-solving skills using the Java programming language. Students are introduced to fundamentals of Java programming language with emphasis on primitive data types, control structures, methods, arrays, classes, objects, abstraction, inheritance and polymorphism. Students learn basic techniques of good programming style, design, coding, debugging, and documentation. Students are able to create programs to solve basic practical problems.
Prerequisites
C or better in Area A mathematics course and in Introduction to Information Technology
Course Objectives/Outcomes/Goals
Course Objectives
Upon successful completion of this course, students will be able to:
1. Use an IDE (Integrated Development Environment) to construct Java programs.
2. Define and appropriately use Java data types, variables, and methods.
3. Utilize appropriate control structures.
4. Recognize the basic characteristics of event-driven, GUI programming.
5. Explain and apply basic concepts of object-oriented programming.
6. Test and debug simple programs in Java.
7. Utilize good coding styles and conventions. Course Outline Topics to be covered:
1. Platform Independence 2. IDE
3. Data Types
4. Syntax Proficiency
5. Coding style
6. Testing and Debugging
7. Decision Structures
8. Iterations/Iterative Programming
9. Algorithm Development
10. Functions/Methods/Parameter Passing
11. Recursion
12. Libraries
13. Arrays
14. Strings and Characters
15. Classes/Instances
16. Visibility
17. Inheritance
18. Interfaces
19. Abstract Classes Textbook Information Title Introduction to Java Programming with JBuilder, 3/E Author Daniel Liang Publisher Prentice Hall Edition/Year 3RD/2004 ISBN 0-13-143049-1 Additional You may want to try getting the 4th or 5th edition
information Type Required resource Optional References
Java in a NutshellDavid FlanaganO'Reilly and Associates4th/20020-59-600283-1
Beginning Java 2Ivor HortonWrox20000-76-454365-2
Java 2: A Beginner's GuideHerb SchildtMcGraw-Hill Osborne Media1st/20000-07-212742-2
Instructor Information
Instructor Information
Name: Cheryl Garvin
Email: VISTA Account
Phone: 714-243-8814 Skype Land 714-478-9404 Cell
Instructor Contact Policy You are encouraged to connect with me via the Vista email
tool whenever you run into an issue. The nature of programming is such that often a small hint can get you over what might seem an insurmountable problem. I check my email every morning, every day of the week. But if you need to connect with me after I check my email, then phone me. If I cannot answer the call, leave a message with your
name and phone number so I can return your call.
Be sure to review your unit assignments early in the week so if you have questions we can connect up early. Last minute questions may get missed and not allow you the time needed to complete assignments on time. I will not be able to allow late postings without late point deductions for these cases.
Policy on Changes to the Syllabus
Policy on Changes to the Syllabus
The professor reserves the right to change the syllabus and class schedule, including assignments and tests with prior notice given 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. I expect every student to log in to the course at least twice a week.
http://www.webbsit.org/StudentPortal/enroll.aspWithdrawal 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 consider 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.
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 and software emulation for Windows i.e. Parallels, Fusion PC, or other Windows XP emulator.
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.
o Download Flash Player 8 for Windows or Macintosh
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 7, 8 and 9. 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 material in Units 1 - 5. 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) All assignments are due no later than the last day of the
unit.
Online study allows you flexibility, however, late postings of
assignments merit late deductions in points unless you connect with me providing a valid reason for the late posting. Life happens and I understand that but be mindful of your time management.
1-2 days late = 5% 3-6 days late = 10%
over 6 days late = 20%
I grade assignments and post within 72 hours of your due dates.
Proctored Exams
The course has a proctored mid-term and a proctored final exam. The mid-term counts for 30% of the final grade, and the final for 35% of the final grade.
Unit 1 - Introduction to Java and IDE Date January 15, 2009
Objectives
After completion of this unit, students should be able to: 1. Define Java and its relationship with World Wide Web 2. Contrast Java applications and applets
3. Install an IDE
4. Create Java projects, applications and applets using an IDE
5. Write, compile and run simple Java applications and applets using an IDE
6. Create simple HTML files that include the applet/object tag
7. Describe the basic structure of Java applications and applets
8. Explain the concept and general use of built-in classes and packages
Topics
1. Platform independence
2. IDE
3. Introduction to Classes
Readings Liang, Chapter 1 and Chapter 14
Assignments
Simple Application and Applet
Your task for this first assignment is to demonstrate that you have installed a Java Integrated Development Environment (IDE) and can write and compile a Java program.
To this end, you should write two programs for this assignment. The first is a console-based Java application that prints "Hello world" to the screen (in text/console mode). The second is a graphical-based applet that displays “Hello world” to the screen using the JOptionPane.showMessageDialog() method.
I also want you to introduce some deliberate errors to the program after it is working and to send me an email indicating (a) what error you introduced, and (b) what error message you got. I would like you to repeat this process 5 times. In other words, what I would like you to do is get the program working, introduce an error, see what error message you get, fix the error, introduce a new error, and so on.
Unit 2 - Data types, variables, expressions, operators and coding styles Date January 26, 2009
Objectives
After completion of this unit, students should be able to: 1. Use Java primitive data types 2. Implement identifiers, variables and constants
3. Utilize operators, expressions and assignments
4. Explain operator precedence, operator associativity and order of operand evaluation
5. Distinguish among syntax errors, logic errors and run-time errors
6. Test and debug simple programs
7. Apply good coding style for program readability and self documentation
8. Find and use IDE and online help when needed
9. Implement simple arithmetic and comparison operations
Topics
1. Data Types
2. Syntax Proficiency
3. Coding style
4. Testing and Debugging Readings Liang, Chapter 2
Assignments
Working with Numbers
In this assignment, you should ask the user for four numbers (floating-point) via a JOptionPane. Once the program has obtained the four numbers, it should display the largest, smallest, average, sum, and product of the numbers.
Be sure you use proper documentation and coding techniques in your solution (i.e. white-space, indentation, good variable names, etc.).
Unit 3 - Control Statements Date February 2, 2009
Objectives
After completion of this unit, students should be able to: 1. Use selection structures: if, if…else, nested if…
else, conditional operator and switch statements 2. Use repetition structures: while, do…while, and for
statements
3. Use continue and break statements
4. Use the truth tables, logical and relational operators
5. Implement a command-line application demonstrating iteration and conditionals
Topics
1. Decision Structures
2. Iterations/Iterative Programming
3. Algorithm Development
4. Syntax Proficiency
5. Coding style
6. Testing and Debugging
Readings Liang, Chapter 2 (Review) and Chapter 3
Assignments
Repetition through Iteration
Your task in this assignment is to implement a command-line application demonstrating iteration and conditionals via the “99 bottles of beer on the wall” song. The song goes like this:
99 bottles of beer on the wall; 99 bottles of beer; take one down, pass it around; 98 bottles of beer on the wall. 98 bottles of beer on the wall; 98 bottles of beer; take one down, pass it around; 97 bottles of beer on the wall. …
2 bottles of beer on the wall; 2 bottles of beer; take one down, pass it around; 1 bottle of beer on the wall. 1 bottle of beer on the wall; 1 bottle of beer; take one down, pass it around; no bottles of beer on the wall. No bottles of beer on the wall.
Notice that the last few times through the song, the word "bottles"is sometimes singular (instead of plural as is the case for all other times through the song).
Write a console-based (text) program that displays the lyrics of this song to the screen. Use iteration (looping) in your solution, and be sure to test for and correctly handle the last few passes through the song (make the word "bottles" singular as needed).
Unit 4 - Methods Date February 9, 2009 Objectives After completion of this unit, students should be able to:
1. Define and invoke methods 2. Explain the need for modularity and the role of
procedural abstraction
3. Overload methods
4. Implement parameter passing
5. Explain visibility and scope of variables in programs
6. Contrast and use recursion and iteration
7. Develop algorithmic and problem-solving skills using modularization and other methods
8. Use Java built-in classes
9. Create simple GUI programs
10. Implement a command-line menu-based system for arithmetic operators
Topics
1. Functions/Methods/Parameter Passing
2. Recursion
3. Libraries
4. Syntax Proficiency
5. Coding style
6. Testing and Debugging Readings Liang, Chapter 4
Assignments
Methods and Procedural Abstractions
Your task in this assignment is to implement a command-line menu-based system for arithmetic operators (i.e. make a 4-function calculator). This involves three primary steps:
1. Display a menu and prompt the user for his/her choice
2. Read in supporting operands for the choice
3. Process the choice on the operands
The menu should display the choices: “add”, “subtract”, “multiply”, “divide”, and “quit”. The program should then read in the user’s choice and validate that he/she has selected a valid choice (repeat the query until he/she provides a valid choice).
Now that the program knows what the user wants to do, it needs to gather more information (i.e. the two floating-point numbers to process). Have the program read in two numbers from the user, perform the desired mathematical operation, and display the result.
Keep repeating this process until the user selects "quit".
Be sure to use good modularity, parameter passing, result passing, and programming style (white-space, indentation, good variable names, etc.) in your solution.
Unit 5 - Arrays Date February 23, 2009
Objectives
After completion of this unit, students should be able to: 1. Declare and use arrays (including multidimensional) 2. Pass arrays to methods
3. Use arrays in sorting, searching and displaying a command line application
Topics
1. Arrays
2. Libraries
3. Syntax Proficiency
4. Coding style
5. Testing and Debugging Readings Liang, Chapter 5 Assignments Arrays
Your task in this assignment is to utilize arrays in sorting, searching and displaying information via a command line application. This assignment can be broken down into two phases:
1. Read in 30 grades (A-F) from the user and keep a count of how many of each grade was earned (i.e. track how many A’s were earned, how many B’s were earned, etc.)
2. Display a histogram (bar-chart) showing the distribution of grades
For extra credit (up to +25%) you may also implement the following two parts
1. Sort the grades from most frequent to least frequent 2. Redisplay the histogram (bar-chart) of the grade
distribution
Note that your program is not storing the grades themselves; it should store the count (frequency) of the grades.
To make things easier, you may display horizontal
histograms (i.e. the bars are horizontal).
Use proper modularity and programming style in your solution.
Unit 6 - Strings and Characters Date March 2, 2009
Objectives
After completion of this unit, students should be able to: 1. Explain the importance of string and character
manipulation 2. Use the String class
3. Use the StringBuffer class
4. Use the StringTokenizer class
5. Implement a string-tokenizing and parsing application
6. Use command-line arguments
Topics
1. Strings and Characters
2. Libraries
3. Syntax Proficiency
4. Coding style
5. Testing and Debugging Readings Liang, Chapter 7 Assignments Working with Strings
Your task for this assignment is to implement a string-tokenizing and parsing applet that reads a string from the user and displays whether the string is a "strict palindrome". A strict palindrome is a string that, if after removing all non-characters from the string, it is the same read forward and backward. Also, capitalization does not matter.
For example, the following are palindromes:
bob
Rats live on; no evil star
A man, a plan, a canal - Panama!
But the following are not palindromes:
What’s up? Google
Rock ‘n’ Roll
The output of your program should display "yes, it is a palindrome" or "no, it is not a palindrome" after checking the string from the user.
Unit 7 - Object-Oriented Programming: Objects and Classes Date March 9, 2009
Objectives
After completion of this unit, students should be able to: 1. Explain the need for and role of data abstraction 2. Describe the components of a class – data
(attributes) and methods (behaviors)
3. Explain the concept of encapsulation and data hiding
4. Use keywords private and public
5. Define and instantiate a simple class
6. Instantiate an object from a class
7. Define a constructor, overload a constructor and demonstrate the use of a constructor
8. Implement constructors in classes
9. Pass object references to methods
10. Explain and use the keyword static
Topics
1. Classes/Instances
2. Visibility
3. Libraries
4. Syntax Proficiency
5. Coding style
6. Testing and Debugging
Readings Liang, Chapter 6
Assignments
The Vending Machine Class
Your task in this assignment is to write a simple class definition for a vending machine. The class should have:
Attributes o Soda count
o Money credit (how much money has been inserted)
Methods
o Add money
o Vend
o Restock
o Constructor
For simplicity sake, you may assume that the machine can hold up to 50 sodas; you may also assume that all sodas cost $0.65. When adding money, simply take in a floating-point number representing how much money to add (i.e. you do not have to manage different coins).
Be sure to make sure that enough money was added to the machine before a soda is vended. Also, when a soda is vended, return the appropriate change (i.e. if more than $0.65 was added to the machine, then return the extra money). Again, don’t worry about managing different kinds of coins – just display the amount returned.
When the machine is "restocked," just set the soda count to the maximum that the machine will hold.
Once you have written the class, create a main/driver program that interacts with an instance of the class. Your program should present a menu of options to the user and process the user’s choice; use creativity and object-oriented design in your solution.
Unit 8 - Object-Oriented Programming: Inheritance Date March 23, 2009
Objectives
After completion of this unit, students should be able to: 1. Explain inheritance and its role in software reusability 2. Define and implement superclasses and subclasses
3. Apply final and abstract modifiers
4. Invoke the superclass constructors and methods using the super keyword.
5. Override methods
6. Define multiple classes in an inheritance hierarchy
Topics
1. Inheritance
2. Libraries
3. Syntax Proficiency
4. Coding style
5. Testing and Debugging Readings Liang, Chapter 8
Assignments
Inheritance
Your task for this assignment is to define multiple classes via inheritance. Your classes should implement various “snacks” including “M&Ms”, “Popcorn”, etc.
To begin, create an abstract “Snack” class. Then, create two classes “Salty” and “Sugary” that inherit from the “Snack” class. Then create classes “M&Ms”, “Popcorn”, “Snickers”, “Gum”, “Crackers”, and “Chips” that inherit from “Salty” or “Sugary” as appropriate.
Once you have your inheritance hierarchy defined, implement the toString method for each class.
Finally, let’s presume that each snack has two additional properties: “calories” and “cost”. Calories is an integer that represents how many calories the snack contains, and cost is a floating-point number that represents how much the snack costs to buy. Implement these properties within your hierarchy as appropriate.
Unit 9 - Object-Oriented Programming: Polymorphism
Date April 6, 2009
Objectives
After completion of this unit, students should be able to: 1. Explain polymorphism and its use in object-oriented
programming 2. Implement programs using polymorphism
3. Explain the role of abstract classes with respect to polymorphism
4. Use the instanceof operator
5. Implement a polymorphic collection class to manage objects
Topics
1. Interfaces
2. Abstract Classes
3. Libraries
4. Syntax Proficiency
5. Coding style
6. Testing and Debugging Readings Liang, Chapter 8 and Chapter 9, Section 9.2
Assignments
Polymorphic Collection
Your task for this assignment is to extend the “Vending Machine” you wrote for assignment seven to add the ability to hold the snacks that you implemented in assignment 8 (i.e. combine the seventh and eighth assignments).
The resultant vending machine class should hold 100 snacks.
Your program should present the user with a menu of choices (“Add money”, “Vend”, and “Restock” as before in assignment seven – with appropriate modifications) and process the user’s choice until he/she selects “Quit’.
Utilize good modularity and object-oriented design/programming in your solution.
Important Dates
Important Dates
Spring Semester 2009WebBSIT Term Calendar
First Day Students May Log into Vista Courses 1-Jan
Classes Begin 9-Jan
Students Must Log Into Course to Confirm Attendance for Financial Aid 9-Jan
Drop/Add 9-14 Jan
Last Day for students to request alternate proctored exam sites 6-Feb
Midterm exams 16-21 Feb
Midpoint Date Last Day for Students to Withdraw with a grade of "W" 2-Mar
Classes end 15-Apr
Final Exams 16-20 Apr
Close this window