FINAL EXAM Final Exam Wednesday, Dec 14: 8: :00 AM (Frny G140)

Slides:



Advertisements
Similar presentations
Written by: Dr. JJ Shepherd
Advertisements

Final Review (lectures 8-16) TA: Truman
Chapter 41 Defining Classes and Methods Chapter 4.
Lecture 27 Exam outline Boxing of primitive types in Java 1.5 Generic types in Java 1.5.
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.
Final Review. Review A Binary Search divides a sorted data structure into two equal parts and each time throws away the part that cannot contain the item.
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.
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.
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.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
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
Some Standard Classes Goals The Object class The String class Wrapper classes The Math class Random Numbers.
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 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Chapter 14 Abstract Classes and Interfaces. Abstract Classes An abstract class extracts common features and functionality of a family of objects An abstract.
Strings and Text File I/O (and Exception Handling) Corresponds with Chapters 8 and 17.
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.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 24.1 Test-Driving the Enhanced Car Payment.
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.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 4 – Completing the Inventory Application.
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.
© 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.
Classes CS 162 (Summer 2009). Parts of a Class Instance Fields Methods.
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.
Chapter 14 – Exception Handling
Graphical User Interfaces -- GUIs
COMP Final Exam Review Yi Hong June 15, 2015.
CS 215 Final Review Ismail abumuhfouz Fall 2014.
“Form Ever Follows Function” Louis Henri Sullivan
CHAPTER 7 & 8 REVIEW QUESTIONS
Chapter 3 Assignment Statement
I/O Basics.
Ellen Walker Hiram College
Advanced Programming Behnam Hatami Fall 2017.
Computer Science II Exam 1 Review.
Advanced Programming in Java
Starting JavaProgramming
The Building Blocks Classes: Java class library, over 1,800 classes:
Review for Midterm 3.
FINAL EXAM Final Exam Tuesday, May 3: 1:00 - 3:00 PM (Phys 112)
Final Review.
Presentation transcript:

FINAL EXAM Final Exam Wednesday, Dec 14: 8:00 - 10:00 AM (Frny G140) 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, assignment, naming 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() Scanner: need to import java.util.*, next(), nextLine(), nextInt(), 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. Integer.parseInt() ) Wrapper classes: Integer, Double Automatic boxing and unboxing 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 (can use split if you want) 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 Linked Lists: creating classes (link to object of same type) Empty List: null pointer (last item always points to null) Generics: no primitive types, defining classes and methods

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