COMS S1007 Object-Oriented Programming and Design in Java August 7, 2007.

Slides:



Advertisements
Similar presentations
Chapter 1 Object-Oriented Concepts. A class consists of variables called fields together with functions called methods that act on those fields.
Advertisements

Georgia Institute of Technology Workshop for CS-AP Teachers Chapter 3 Advanced Object-Oriented Concepts.
Slides 4/22 COP Topics Final Exam Review Final Exam The final exam is Friday, April 29 th at 10:00 AM in the usual room No notes, books, calculators,
COMS S1007 Object-Oriented Programming and Design in Java July 8, 2008.
Chapter 41 Defining Classes and Methods Chapter 4.
CS 106 Introduction to Computer Science I 04 / 16 / 2010 Instructor: Michael Eckmann.
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
COMS S1007 Object-Oriented Programming and Design in Java August 12, 2008.
COMS S1007 Object-Oriented Programming and Design in Java July 24, 2008.
Review CSC 171 FALL 2004 LECTURE 21. Topics Objects and Classes Fundamental Types Graphics and Applets Decisions Iteration Designing Classes Testing and.
Chapter 10 Classes Continued
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
COMS W1004 Introduction to Computer Science June 29, 2009.
OOP Week 3 1 Object Oriented Programming in Java Monday, Week 3 Interface PinBallTarget OOP Concepts Last Week’s Assignment Arrays Collection Class --
Networking with Java CSc 335 Object-Oriented Programming and Design Spring 2009.
Chapter 6: Graphical User Interface (GUI) and Object-Oriented Design (OOD) J ava P rogramming: Program Design Including Data Structures Program Design.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
1 Inheritance and Polymorphism Chapter 9. 2 Polymorphism, Dynamic Binding and Generic Programming public class Test { public static void main(String[]
ACM/JETT Workshop - August 4-5, ExceptionHandling and User Interfaces (Event Delegation, Inner classes) using Swing.
Chapter 12 Inheritance and Exceptions Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas,
220 FINAL TEST REVIEW SESSION Omar Abdelwahab. INHERITANCE AND POLYMORPHISM Suppose you have a class FunClass with public methods show, tell, and smile.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 3 The Structure and Syntax of Java.
Syllabus (1) WeekChapters 1Introduction to the course, basic java language programming concepts: Primitive Data Types and Operations 1, 2 2Methods, Control.
CSC 113 Java Programming II
Java Programming: From Problem Analysis to Program Design, Second Edition1  Learn about basic GUI components.  Explore how the GUI components JFrame,
ICS 102 Computer Programming University of Hail College of Computer Science & Engineering Computer Science and Software Engineering Department.
CIS 644 Aug. 25, 1999 tour of Java. First … about the media lectures… we are experimenting with the media format please give feedback.
Chapter 8. About the Midterm Exam.. Exam on March 12 Monday (Tentatively) Review on March 7 Wednesday Cover from Chapter 6 Grades will be out before spring.
CS1101: Programming Methodology Aaron Tan.
Selected Topics in Information Technology Programming Language - JAVA Semester 1/2554.
Java Programming: Guided Learning with Early Objects
1 Java: AP Curriculum Focus and Java Subset Alyce Brady.
Introduction to Exception Handling and Defensive Programming.
ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
COMS S1007 Object-Oriented Programming and Design in Java July 19, 2007.
© 2006 Pearson Education 1 More Operators  To round out our knowledge of Java operators, let's examine a few more  In particular, we will examine the.
Data Structures Using Java1 Chapter 2 Inheritance and Exception Handling.
Chapter 12 Handling Exceptions and Events. Chapter Objectives Learn what an exception is Become aware of the hierarchy of exception classes Learn about.
1 IDLOOPC1998. Object-Oriented Programming Using C++ CLASS 1.
Chapter 14 Abstract Classes and Interfaces. Abstract Classes An abstract class extracts common features and functionality of a family of objects An abstract.
CIS Intro to JAVA Lecture Notes Set July-05 GUI Programming – Home and reload buttons for the webbrowser, Applets.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Java Programming: From Problem Analysis to Program Design, 3e Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
GUIs Graphical User Interfaces. Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events.
Java Programming: From Problem Analysis to Program Design, Second Edition1 Lecture 5 Objectives  Learn about basic GUI components.  Explore how the GUI.
Week101 APCS-AB: Java Miscellaneous Topics: Snippets we missed in Chapters 1-6 of book November 11, 2005.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 6 Objects and Classes.
Chapter 8 Class Inheritance and Interfaces F Superclasses and Subclasses  Keywords: super F Overriding methods  The Object Class  Modifiers: protected,
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2002 Sections Ms. Susan Mitchell.
Programming & Debugging. Key Programming Issues Modularity Modifiability Ease of Use Fail-safe programming Style Debugging.
Introduction to Objects and Encapsulation Computer Science 4 Mr. Gerb Reference: Objective: Understand Encapsulation and abstract data types.
© 2006 Pearson Addison-Wesley. All rights reserved 1-1 Chapter 1 Review of Java Fundamentals.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
1 Review for Midterm 2 Aaron Bloomfield CS 101-E.
Data Structures Using Java1 Chapter 1 Software Engineering Principles and Java Classes.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Review IS Overview: Data  Inside the application Collections  Outside the application Database XML  Getting/displaying Swing  Communicating.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 10 Java Fundamentals Objects/ClassesMethods.
A High Flying Overview CS139 – Fall 2010 How far we have come.
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
EE2E1. JAVA Programming Revision Lecture.
Java Programming: From Problem Analysis to Program Design,
Programming in Java Text Books :
Review CSE116 2/21/2019 B.Ramamurthy.
FINAL EXAM Final Exam Wednesday, Dec 14: 8: :00 AM (Frny G140)
FINAL EXAM Final Exam Tuesday, May 3: 1:00 - 3:00 PM (Phys 112)
Presentation transcript:

COMS S1007 Object-Oriented Programming and Design in Java August 7, 2007

Final Exam Logistics Thursday, 5:40-8:40pm No calculators, books, notes, electronic devices, etc. Graded exams will be available for viewing starting next Tuesday

What’s on the final exam? All material covered in lecture Programs discussed in lecture and posted on the class website Assigned readings –Emphasis will be on material covered in class

Assigned readings Java basics: chapters 1-7 Designing classes: 8.1 – 8.9 Interfaces, Inheritance: 9.1 – 9.5, 10.1 – 10.8 Graphics: 2.11 – 2.13, 3.9, 18.1 – 18.4 Testing: 2.8, 3.6, 5.5, 7.8 Event handling: 9.6 – 9.10 Threads: 20.1 – 20.5 Networking: 21.1 – 21.5 Exceptions: 11.1 – 11.6 Data structures: 15.1 – 15.4, 16.1 – 16.7

What’s NOT on the final? Extra material in textbook, such as: –Common Errors –How Tos –Quality Tips –Productivity Hints –Random Facts –….unless covered in lecture!! Advanced Topics covered last week

Format of the exam short-answer “concept” questions 4-5 writing Java methods 1-2 writing Java classes “Find the bugs” question 3-4 determining output of Java code

Studying for the exam Review your class notes, particularly the descriptions of Java classes and APIs Review and make sure you understand the source code that we looked at in class and in the textbook from the assigned readings Review the comments made on your homeworks Use the discussion board on CourseWorks

Taking the exam Note how much each question is worth Look through the entire exam and start by working on problems that you think you can do quickly and that are worth a lot of points Read the questions carefully to see what is expected of you Ask the proctor if you have any questions

More advice Concept questions –Don’t write too much, but try to be detailed –Give an example if you can’t explain it Writing Java code –You are graded on accuracy of syntax and semantics (your code must “compile”) –Pay attention to stylistic issues –You will not be provided with any API docs

More advice “Find the bugs” question –Look for compile-time (syntax, semantic) errors before trying to find logic errors –Be sure it’s a bug (look out for tricks) Understanding Java code –Review the different APIs to know what they do

Classes you should know well Math : random, pow, sqrt… String : charAt, indexOf, size… Scanner : constructors, hasNext, next, nextLine… JFrame : setSize, setVisible, add… Graphics : setColor, drawString, fillOval… Object : equals, hashCode, toString, clone… These are not the only ones that may appear on the exam, but are the ones you should know best

Java Basics (chapters 1-7) OOP: classes and objects Encapsulation: public and private Methods and constructors Object references and aliases Pre- and post-increment Lazy evaluation of boolean expressions

Coding style Avoid calling the same method multiple times Use lazy evaluation Use constants User errors vs. programmer errors Avoid side effects Member variables vs. local variables Aliasing a parameter

Designing classes (8.1 – 8.9) Classes vs. methods –Classes are nouns, methods are verbs Cohesion: everything belongs together Coupling: co-dependence Side effects: modifying an object passed as an explicit parameter

Interfaces & Inheritance (9.1 – 9.5, 10.1 – 10.8) Interfaces: collection of abstract methods Polymorphism Inner classes Inheritance Abstract classes Object : the global superclass

Graphics and Java GUIs (2.11 – 2.13, 3.9, 18.1 – 18.4) JFrame and its methods JComponent Drawing with the Graphics object Java Swing components –JPanel, JTextField, JButton, etc.

Testing (2.8, 3.6, 5.5, 7.8) The “assert” statement Unit testing –Boundary values and equivalence classes Integration and systems testing Regression testing

Event handling (9.6 – 9.10) Event sources and listeners –Not just for GUI events Java GUI Listeners –MouseAdapter –MouseMotionAdapter –KeyAdapter –ActionListener MouseEvents, KeyEvents, ActionEvents

Threads (20.1 – 20.5) Why use threads? The Thread class and Runnable interface Invoking a new Thread and important methods –start: begins a new line of execution –run: starting point of executable code Race conditions Locks and synchronization

Networking (21.1 – 21.5) The ServerSocket class –constructor binds to a port –“accept” method waits for a connection The Socket class –“connect” method connects to a port Input and Output streams

Exceptions (11.1 – 11.6) Exception hierarchy The try/catch/finally blocks Throwing exceptions Custom exceptions Using exceptions for control flow

Data structures (15.1 – 15.4, 16.1 – 16.7) Linked Lists –LinkedList and ListIterator class Linked Lists vs. arrays Stack: LIFO, push/pop Queue: FIFO, add/remove Set: add, remove, contains Map: get, put Hashing functions and hash tables Trees

Final Exam Logistics Thursday, 5:40-8:40pm No calculators, books, notes, electronic devices, etc. Graded exams will be available for viewing starting next Tuesday