COSC 1320 Introduction to Computer Science II

Having as many practices as possible is the right way to learn a language!

There is NO lab for this course, so please do compile and modify the provided examples!

Spring 2015


Course summary

This course aims to introduce the students the principles of object-oriented programming with the examples of C++ and Java languages.

The goal is to prepare students with the fundamental programming skills of C++ and Java for the future large-scale OOP tasks.

Prerequisites:

COSC 1410 Introduction to Computer Science I

Textbooks (required):

1) Absolute C++ (5th edt.), 2) Absolute Java (5th edt.), Walter Savitch, Addison-Wesley.

Recommended Reading:

Software and IDE (tutorials should be available in the blackboard learn):

Detailed syllabus is also available in the blackboard learn.


Schedule and Materials

Come and visit often as the materials will be updated without notice.

Week 1 (Ch 6~8, except 7.3)

Main goal: review OOP principles, important concepts of class, object, encapsulation, abstract data type (ADT), constructors,

Knowledge points that you should know:

Additional examples: (Again, please compile and play with the following examples, try to break the rules and see what would happen!)

An example of course grade for students, cpp1, cpp2, (constructors, destructor, dynamic memory allocation)

An example of a clock class cpp3 (constructors and operator overloading)

An example of car cpp4 (constructors)

A different employee example cpp5 (constructors, destructor, dynamic memory allocation, dynamic creation of objects)

Please be familiar with your selected programming environment. Be sure to compile and execute the examples of the textbook and the course webpage!

Week 2 (Ch.14) Inheritance, UML intro

Main goal: understand the mechanism and benefits of inheritance of OOP, and know how to implement it in C++. Basic knowledge on UML (will get familiar with it through subsequent exercises)

Knowledge points that you should know:

Additional materials:

Week 3 (Ch.15) Polymorphism and virtual functions

Main goal: Get familiar with the Polymorphism mechanism of OOP and how to achieve that in C++.

Knowledge points that you should know:

Additional materials:

Week 4 (Ch.18) Polymorphism reviews and Exception Handling

Main goal: Get familiar with the exception handling in C++.

Knowledge points that you should know:

Additional materials:

Week 5 (Ch.16) C++ Template, Mid-term reviews

Main goal: Get familiar with the C++ template mechanism.

Knowledge points that you should know:

Addition materials:

Mid-term exam reviews (pptx)

Week 6 (Mid-term exam 1 and Java introduction)

Mid-term exam 1 on Feb. 24 at CBB 104 from 9:50am-11:20am! The exam will cover all the above knowledge points except UML!

Week 7 ( Ch.4, Ch.5, Ch.7, Java class and inheritance)

Main goal: get familiar with the class definition and usage in Java; understand and know how to use inheritance in java

Knowledge points that you should know:

Additional materials:

Review examples (pptx)

Lecture slides (pptx)

group project (.pdf) (data) due on Thursday (03/12) midnight.

Can you use Java to re-implement what we have done for the inheritance using C++ above?

Week 8 (Ch.8, Ch. 10, Java Polymorphism and File I/O)

Main goal: Review what polymorphism is and why it is useful, learn how to achieve that in Java and how it is different from C++. Understand the concept of Abstract class and interface and their usage. Revisit the File I/O in java.

Knowledge points that you should know:

Additional materials:

Lecture slides (polymorphism pptx) (File_IO pptx)

lecture examples (ex1.zip, ex2.zip, figure_ex.zip)

Spring break (Mar.16~Mar.21)

Week 9(Review and the second Mid-term)

Come to the Tuesday (Mar.24) lecture for a review (review slides pptx, examples ex1, ex2, ex3, ex4).

Mid-term exam 2 on Mar. 26 at CBB 104 from 9:50am-11:20am! The exam will cover all the knowledge points after mid-term exam1.

Week 10 (File I/O continued, Exception Handling)

Main goal: Term project review; Continue file I/O in java, read/write text files, read/write binary files;

Knowledge points that you should know:

Term project rules (Important dates: deadline for term project proposal 9am April 9, 2015; deadline for submission of your term project 9am April 23, 2015 before presentation!!!)

Additional materials:

Lecture slides (File_I/O_2.pptx)

Class examples (binary_file_exs, object_serialization_exs)

Week 11 (Exception handling, Swing I)

Main goal: Exception handling in Java; Understand the mechanism of GUI program, even-driven-programming, and the basic model of GUI programming using Swing.

Knowledge points that you should know:

Additional materials:

Lecture slides ( Exception_Handling_pptx, Java Swing I_pptx)

Class examples (exception_handling_exs)

Examples of Java Swing shown in the class are from textbook

Extra example for the grid layout with borderlines (.java)

A good place to find other swing example [A java swing tutorial (http://zetcode.com/tutorials/javaswingtutorial/)]

Week 12 (Java Swing, continued)

Main goal: continue the introduction of other standard usage of swing package. If you master the basic steps of creating a hierarchical GUI program from the previous lectures, the following will be trivial.

Knowledge points that you should know:

Additional materials:

slides (pptx)

Week 13 (Java Interfaces and Inner Classes)

Main goal: revisit Java interfaces, get familiar with a number of useful interfaces, learn how to utilize the mechanism of inner class.

Knowledge points that you should know:

Additional materials:

slides (pptx)

Student Term Porject Presentations:

First place: Group 9-1 (Aaron Johnson) Graph

Second place: Group 13 (Gjvon Graves, Vicki Lee, Hejal Soni) Graph

Third place: Group 4 (Darya Balybina, Thomas Doyle) Sudoku

Congratulations!

Week 14 (Term Porject Presentation)

Final exam will be on May 14 at CBB 104 from 11:00am-2:00pm! The exam will cover all the material of Java (NO C++ content).

The following provides an overview of the Java content we have covered in the class

slides (pptx), over view examples (.zip)


Links to valuable C++ programming resources:

Links to valuable Java programming resources: