William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline 1. TITLE OF COURSE AND COURSE NUMBER: Object-Oriented Programming in Java, CIT 2420 Credits: 4 2. DESCRIPTION OF THE COURSE: A second course in program design, using Java and Object-oriented analysis and design with UML. Topics include: Review of Java fundamentals (importing, assignments, strings, input/output, conditionals, loops, arrays, functions), recursion, abstract data type (ADT), objects/classes, inheritance, polymorphism, generics, file processing, exception handling, event-driven programming, GUI and graphics (Java 2D, Swing versus AWT), multi-threading, and UNIX basics with X-Windows. Programming projects will be assigned in Java in Windows and UNIX. 3. COURSE PREREQUISITES: CIT 2130 or CS 2300 4. COURSE OBJECTIVES: To learn Java s object-oriented programming (OOP) and advanced features as a continuation from previous programming courses. To learn the concepts and practices of data and procedure abstraction, data hiding/encapsulation, and abstract data types. To learn principles of software engineering using object-oriented analysis and design (OOAD) with UML and in terms of software reuse and managing complexity. To continue building up practical problem solving and programming skills with Java through extensive programming projects. To become familiar with both Windows and Unix / Linux environments via secure telnet and X-Windows. and the available tools including debuggers and profilers for software development. In both, popular Java IDE s such as Netbeans, Eclipse, and Studio 1 will be used as pedagogical development platforms both in classwork, homework, and projects. To introduce concepts such as linked-lists and other rudimentary data structures and how these structures can facilitate problem-solving. 5. STUDENT LEARNING OUTCOMES: Upon completion of the course, students will be able to: 1
a) Apply object-oriented design principles in computer problem solving. This includes describing the advantages of Java s object-oriented programming (OOP) paradigm. Students will be able to effectively code using the following OOP constructs and associated methodologies: objects/classes, inheritance, polymorphism, generics. b) Program with the advanced features of Java programming language including eventoriented programming, exception-handling, file processing c) Program using graphics and GUI s with mouse and keyboard listeners. d) Program exploiting concurrency via multi-threading. e) Understand the basic principles of software engineering in managing complex software projects using UML in the OOAD processes f) Make use of software development tools, particularly the debugger g) Understand the trends of languages, e.g., how Java programming has evolved into a major language for the Internet applications h) Develop programs in Unix/Linux environments both graphically in X-Windows and via secure telnet. i) Work with several professional Java integrated development environments (such as Netbeans and Eclipse) in a productive manner. Through classroom participation and discussions, and various homework, term papers, team lab projects, and other assignments, the course also reinforce the following students learning outcomes of the university: a) Effectively express themselves in written and oral form. Measure: exams, surveys, and projects. b) Demonstrate ability to think critically. Measure: exams, surveys, and projects. c) Locate and use information. Measure: projects. d) Demonstrate ability to integrate knowledge and idea in a coherent and meaningful manner. Measure: exams, surveys, and projects. e) Work effectively with others in teams. Measure: surveys and projects. 6. TOPICAL OUTLINE OF THE COURSE CONTENT: Topic 1: Topic 2: Review of Java fundamentals a) Importing capabilities b) Variables, arithmetic expressions, assignments, strings c) Characters and Strings d) Input/Output e) Conditionals such as if, if-else, and switch f) Loops (while and for), g) Searching, sorting, and processing with arrays h) Functions i) Java Virtual Machine (JVM) j) Java IDE s such as Netbeans, Eclipse, and Studio 1 as well as Jedit, Notepad++, and the command-line Advanced Aspects of Java a) Recursion and recursive functions b) File processing 2
c) Exception handling, Topic 3: Topic 4: Topic 5: Topic 6: Topic 7: OOP: Designing with Classes a) The concept of abstract data type or ADT b) Object-oriented analysis c) Design with UML. d) Definition of class e) Constructing a class from attributes f) Constructors/destructors g) Encapsulation of data and functions h) Adding member functions i) Access specifiers and scope resolution operator j) Case Studies Inheritance a) Superclasses b) Subclasses c) Protected members d) Class Object e) Multiple inheritance issues f) Interfaces g) Case Studies Polymorphism, a) Polymorphism Examples b) Demonstrating Polymorphic Behavior c) Abstract Classes and Method d) Polymorphic Processing, Operator instanceof and Downcasting e) Allowed Assignments Between Superclass and Subclass Variables f) Case Studies Generics, a) Generic Collections b) Generic Methods c) Generic Methods d) Compile-Time Translation Issues e) Overloading Generic Methods f) Generic Classes g).7 Raw Types h) Wildcards in Methods i). Generics and Inheritance: j) Case Studies GUI and graphics a) GUI Basics b) Swing versus AWT c) Listeners and Event-driven programming, d) Mouse & Keyboard event handlers 3
e) Graphics with Java 2D API f) Drawing Primitves g) Introduction to Java Applets (brief ) h) Adding Multimedia to Applets (brief ) Topic 8: Topic 9: The Unix operating system a) History b) File systems c) The utilities d) The editors e) Java compiling and debugging tools in UNIX f) X-Windows basics Multi-threading a) Introduction b) Thread States: Life Cycle of a Thread c) Creating and Executing Threads with Executor Framework d) Thread Synchronization e) Data Sharing Unsynchronized & Synchronized approaches f) Producer/Consumer Relationship: Different models both with and without Synchronization g) Concurrent Collections Overview h) Multithreading with GUI i) Performing Computations in a Worker Thread j) Processing Intermediate Results with SwingWorker k) Interfaces Callable and Future l) Java SE 7: Fork/Join Framework 7. GUIDELINES/SUGGESTIONS FOR TEACHING METHODS AND STUDENT LEARNING ACTIVITIES: a) Lectures, recitations, and classroom discussions emphasizing active learning b) Projects and homework reports c) Lab and hands-on sessions 4
8. GUIDELINES/SUGGESTIONS FOR METHODS OF STUDENT ASSESSMENT STUDENT LEARING OUTCOMES): a) Tests, quizzes, and final examination b) Assorted homework assignments including UML designs and reports c) Programming and lab projects d) Attendance and classroom participation 9. SUGGESTED READINGS. TEXTS. OBJECTS OF STUDY: Deitel, H. and Deitel, P., 2011, Java How to Program (Early Objects), 9th Edition, Prentice Hall (Pearson). Glass, Graham and King Ables, 2003, UNIX: For Programmers and Users, Third Edition, Prentice-Hall. (Pearson). 10. BIBLIOGRAPHY OF SUPPORTIVE TEXTS AND OTHER MATERIALS: Dale, Nell, Weems, C., and Headington, M., 2008, Programming and Problem Solving with Java, Second Edition, Jones and Bartlett Publishers. Eckel, B., 2006, Thinking in Java, 4 th Edition, Prentice Hall (Pearson). Carrano, F., 2011, Imagine! Java: Programming Concepts in Context, Prentice Hall (Pearson). Gaddis, T. and Muganda, G., 2012, Starting Out with Java: From Control Structures through Data Structures, 2 nd Edition, Addison-Wesley (Pearson). Goetz, B. et al., 2006, Java Concurrency in Practice, Addison-Wesley (Pearson) Horstmann, C.S., 2009, Big Java: Compatible with Java 5, 6 and 7, Wiley. Horstmann, C.S., 1997, Practical Object-Oriented Development in C++ and Java, Wiley Lea, D., 1999, Concurrent Programming in Java(TM): Design Principles and Pattern, 2nd Edition, Prentice Hall (Pearson). Lewis, DePasquale & Chase, 2011, Java Foundations: Introduction to Program Design and Data Structures, 2 nd Edition, Prentice Hall (Pearson). Liang, Y. Daniel, 2011, Introduction to Java Programming, Comprehensive, 8 th Edition, Prentice Hall (Pearson). Naftalin M., and Wadler, P., 2006, Java Generics and Collections, O'Reilly. 5
Reges, S. and Stepp, M, 2010 Building Java Programs: A Back to Basics Approach, 2nd Edition, Addison Wesley, (Pearson). Savitch, W., 2012, Java: An Introduction to Problem Solving and Programming, 6 th Edition, Prentice Hall (Pearson). Savitch, W., 2010, Absolute Java, 4 th Edition, Addison-Wesley (Pearson). Savitch, W. and Carrano, F. 2009, Java: Introduction to Problem Solving and Programming, 5th Edition, Prentice Hall (Pearson). Sierra, K and Bates, B. 2005, Head First Java, 2nd Edition, O'Reilly. Java Certification: Lawhead & Ferguson, 2009, Sun Certified Java Programmer Lab Manual, Pearson. Sun Microsystems, 2009 Sun Certified Java Programmer Practice Test, Pearson. UNIX Texts: Afzal, A., 1998, UNIX Unbounded: A Beginning Approach, Prentice Hall, Upper Saddle River, NJ Andersen, P., 1997, Just Enough Unix, 2nd edition, Irwin publishing Company Sobell, M., 1995, UNIX System V: A Practical Guide, 3rd edition, Prentice Hall, Upper Saddle River, NJ Wang, S., 1996, An Introduction to UNIX with X and the Internet, PWS Publishing Company 11. PREPARERE'S NAME AND DATE: Dr. John Najarian 12. ORIGINAL DEPARTMENTAL APPROVAL DATE: Spring, 2011 13. REVISORS'S NAME AND DATE: 14. DEPARTMENTAL REVISION APPROVAL DATE: 6