FINAL EXAM Final Exam Tuesday, May 3: 1:00 - 3:00 PM (Phys 112)

Slides:



Advertisements
Similar presentations
Written by: Dr. JJ Shepherd
Advertisements

Fall 2007CS 225 Graphical User Interfaces Event Handling Appendix C.
Final Review (lectures 8-16) TA: Truman
Lecture 27 Exam outline Boxing of primitive types in Java 1.5 Generic types in Java 1.5.
Java Programming, 3e Concepts and Techniques Chapter 3 Manipulating Data Using Methods.
Final Review Recitation – 05/01/2009 CS 180 Department of Computer Science, Purdue University.
1 Chapter 6 Inheritance, Interfaces, and Abstract Classes.
1 Chapter 7 Inheritance, Polymorphism, and Scope.
Slides prepared by Rose Williams, Binghamton University Chapter 10 File I/O.
Chapter 91 Streams and File I/O Chapter 9. 2 Reminders Project 6 released: due Nov 10:30 pm Project 4 regrades due by midnight tonight Discussion.
CS102--Object Oriented Programming Lecture 14: – File I/O BufferedReader The File class Write to /read from Binary files Copyright © 2008 Xiaoyan Li.
CS 225 Java Review. Java Applications A java application consists of one or more classes –Each class is in a separate file –Use the main class to start.
March 2005Java Programming1. March 2005Java Programming2 Why Java? Platform independence Object Oriented design Run-time checks (fewer bugs) Exception.
Copyright © 2003 ProsoftTraining. All rights reserved. Sun Certified Java Programmer Exam Preparation Guide.
Differences between C# and C++ Dr. Catherine Stringfellow Dr. Stewart Carpenter.
Io package as Java’s basic I/O system continue’d.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Java Programming, 2E Introductory Concepts and Techniques Chapter 3 Manipulating Data Using Methods.
1 Review of Java Higher Level Language Concepts –Names and Reserved Words –Expressions and Precedence of Operators –Flow of Control – Selection –Flow of.
Applets and Frames CS 21a: Introduction to Computing I First Semester,
By Nicholas Policelli An Introduction to Java. Basic Program Structure public class ClassName { public static void main(String[] args) { program statements.
The Java Inheritance Hierarchy CSIS 3701: Advanced Object Oriented Programming.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Java Programming Fundamentals. Lesson 1: Java Runtime Environment.
CS 112 Department of Computer Science George Mason University CS 112 Department of Computer Science George Mason University Final Review Lecture 14.
CS 206 Introduction to Computer Science II 09 / 10 / 2009 Instructor: Michael Eckmann.
CompSci 100E 35.1 Graphical User Interfaces: GUIs  Components  Flat Layouts  Hierarchical Layouts  Designing a GUI  Coding a GUI.
Parts of JAVA 1www.gowreeswar.com. Features of JAVA 2www.gowreeswar.com.
Applications Development
Chapter 12Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Announcements/Reminders l Next week: »No Lectures »No Labs »Recitation.
Applets and Frames. Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L14: GUI Slide 2 Applets Usually.
Chapter 14 Abstract Classes and Interfaces. Abstract Classes An abstract class extracts common features and functionality of a family of objects An abstract.
Copyright © 2002 ProsoftTraining. All rights reserved. Java Programming Fundamentals.
Streams and File I/O Chapter 9. Outline Overview of Streams and File I/O Text-File I/O Using the File Class Basic Binary-File I/O Object I/O with Object.
1 Review of Java Basic Concepts –Names and Reserved Words –Expressions and Precedence of Operators –Flow of Control – conditional statements –Flow of Control.
Fall 2002CS 150: Intro. to Computing1 Streams and File I/O (That is, Input/Output) OR How you read data from files and write data to files.
CS1101 Group1 Discussion 10 Lek Hsiang Hui comp.nus.edu.sg
CS 180 Final Exam Review 12/(11, 12)/08. Announcements Final Exam  Thursday, 18 th December, 10:20 am – 12:20 pm in PHYS 112  Format 30 multiple choice.
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
Written by: Dr. JJ Shepherd
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 25 - Beyond C & C++: Operators, Methods, and.
SourceAnatomy1 Java Source Anatomy Barb Ericson Georgia Institute of Technology July 2008.
© 2006 Pearson Addison-Wesley. All rights reserved 1-1 Chapter 1 Review of Java Fundamentals.
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
Graphical User Interface (GUI)
Chapter 9Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Announcements/Reminders l Project 6 due on Thursday March 31 (3 weeks)
5-1 GUIs and Events Rick Mercer. 5-2 Event-Driven Programming with Graphical user Interfaces  Most applications have graphical user interfaces to respond.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 10 Java Fundamentals Objects/ClassesMethods.
GUI.1 Graphical User Interfaces GUIs. GUI.2 The Plan Components Flat Layouts Hierarchical Layouts Designing a GUI Coding a GUI.
CSE 205 Exam 2 Review By Cheri Thompson and Katherine Kincade.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Information and Computer Sciences University of Hawaii, Manoa
Chapter 14 – Exception Handling
Graphical User Interfaces -- GUIs
CS 215 Final Review Ismail abumuhfouz Fall 2014.
“Form Ever Follows Function” Louis Henri Sullivan
CHAPTER 7 & 8 REVIEW QUESTIONS
Objects, Classes, Program Constructs
I/O Basics.
Ellen Walker Hiram College
Primitive Types Vs. Reference Types, Strings, Enumerations
An Introduction to Java – Part I
Computer Science II Exam 1 Review.
Graphical user interface-based programming
The Building Blocks Classes: Java class library, over 1,800 classes:
FINAL EXAM Final Exam Wednesday, Dec 14: 8: :00 AM (Frny G140)
Review for Midterm 3.
Final Review.
Presentation transcript:

FINAL EXAM Final Exam Tuesday, May 3: 1:00 - 3:00 PM (Phys 112) Cumulative (weighted towards recent material) 40 MC (2 points each), 6 programming (20 points each) = 200 points total Old Final Exams Available On Website

Chapter 1: Introduction to Computers and Java Hardware, memory Object Oriented Programming: Encapsulation, Polymorphism, Inheritance Java Programs: .java, .class files, byte-code interpreter

Chapter 2: Primitive Types, Strings, and Console I/O Variables (int, char, float, etc): declarations and assignment Type Casting: Implicit and Explicit Integer/Float Division, Parentheses/Precedence Rules String class: concatenation, indices (0 to n-1) String methods: length(), equals(), trim(), charAt(), compareTo() SavitchIn: readInt(), readLineFloat(), readLine(), etc

Chapter 3: Flow of Control If-else statements, nested if-else statements Comparison operators (==, !=, >, <=, etc) Boolean operators: &&, || Switch statement (make sure to have “break;”) While loop: 0 or more iterations Do-while loop: 1 or more iterations For loops: for(initialize; boolean_check; update_action) Nested loops Boolean type (only “true” or “false” values)

Chapter 4: Defining Classes and Methods Class definition: “public class Class_name {“ Public/private data variables Method definition: “public type method_name {“ Methods return values (int, string, etc) or don’t (null) Invoking methods: “object_name.method_name();” Creating objects: “Class_name variable_name = new class_name();” The “this” parameter Information hiding/encapsulation Objects variables: references (memory address) vs. data Equals methods for classes

Chapter 5: More About Objects and Methods Static methods: called without an object (e.g. SavitchIn) Wrapper classes: Integer, Double Method overloading: different parameters (cannot change return type) Constructors: default and others

Chapter 6: Arrays Creating/accessing arrays Arrays are a reference to memory segment For loop: stepping through arrays (.length) (watch out for: ArrayIndexOutOfBounds exceptions) Arrays of objects Sorting arrays: selection sort Multi-dimensional arrays

Chapter 7: Inheritance Declaration: “public class Class_name extends Class_name2” Overriding method definitions (“final” modifier: method can’t be overridden) Superclass constructor calls: “super(parameters)” Interface implementation: “public class Class_name implements Interface_name” Implement/Extend: can implement multiple interfaces (comma separated) but extend only one class

Chapter 8: Exception Handling Try/catch/finally block Throwing exceptions: “throw new Exception(“info”);” getMessage for exceptions Defining your own exception classes: “public class Class_name extends Exception” Methods throwing exceptions: “public void method_name() throws DivideByZeroException” – don’t have to handle exception in this method but must in calling method Multiple exception handling (hierarchy)

Chapter 9: Streams and File I/O Need: import java.io.*; StringTokenizer class Be sure to try/catch IOExceptions Text Files: - PrintWriter outputStream = new PrintWriter(new FileOutputStream(“filename”); - BufferedReader inputStream = new BufferedReader(new FileReader(“filename”); - reads nothing at end of file (null) Binary Files: - ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(“filename”); - ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(“filename”); - throws EOFException at end of file

Chapter 10: Dynamic Data Structures Need: import java.util.*; Vectors: declaring, adding elements, setting elements, retrieving elements Be sure to use wrapper classes, not primitive types Linked Lists: creating classes (link to object of same type) Empty List: null pointer (last item always points to null)

Chapter 11: Recursion Three things needed: 1. Branching statement 2. Recursive call 3. Stopping case (aka “Base case”) Can always write recursive methods as iterative but not always easier to write/understand Binary Search Merge Sort

Chapter 12: Window Interfaces Using Swing Event-driven programming (button clicks, etc) Need: import javax.swing.*; import java.awt.*; import java.awt.event.*; Declaring swing class: “public class Class_name extends JFrame” JLabel, JButton, JTextArea, JTextField, Jpanel, ContentPane Constructor: set size etc, be sure to “setVisible(true);” Layout Managers: FlowLayout, BorderLayout, GridLayout ActionListener method for handling events: “… implements ActionListener”

Chapter 13: Applets and HTML Same imports needed as swing Classes: “public class Class_name extends JApplet” Need: “public void init()” method: no constructor, no setVisible

Chapter 14: More Swing Menus: JMenu, JMenuItem, JMenuBar Nesting menus Icons, JScrollPane Layout Managers: BoxLayout, CardLayout Inner classes