Chapter 4 Test Review First day

Slides:



Advertisements
Similar presentations
Looking inside classes Fields, Constructors & Methods Week 3.
Advertisements

This is Java Jeopardy Writing Methods…chapter 4…
Based on Java Software Development, 5th Ed. By Lewis &Loftus
© 2011 Pearson Education, publishing as Addison-Wesley Chapter 4: Writing Classes Presentation slides for Java Software Solutions for AP* Computer Science.
1 Classes, Encapsulation, Methods and Constructors (Continued) Class definitions Instance data Encapsulation and Java modifiers Method declaration and.
Methods. int month; int year class Month Defining Classes A class contains data declarations (static and instance variables) and method declarations (behaviors)
Chapter 4: Writing Classes
© 2006 Pearson Education Chapter 4: Writing Classes Presentation slides for Java Software Solutions for AP* Computer Science A 2nd Edition by John Lewis,
Chapter 4: Writing Classes
1 Composition A whole-part relationship (e.g. Dog-Tail) Whole and part objects have same lifetime –Whole creates instance of part in its constructor In.
Lecture 3: Topics If-then-else Operator precedence While loops Static methods Recursion.
Encapsulation, Inheritance & Interfaces CSE 115 Spring 2006 February 27, March 1 & 3, 2006.
1. 2 Introduction to Methods  Method Calls  Parameters  Return Type  Method Overloading  Accessor & Mutator Methods  Student Class: Revisited.
Evan Korth New York University Computer Science I Classes and Objects Professor: Evan Korth New York University.
CSE 115 Week 3 January 28 – February 1, Monday Announcements Software Installation Fest: 2/5 and 2/6 4pm – 7pm in Baldy 21 Software Installation.
Chapter 4: Writing Classes Presentation slides for Java Software Solutions Foundations of Program Design Third Edition by John Lewis and William Loftus.
Chapter 6: Function. Scope of Variable A scope is a region of the program and broadly speaking there are three places, where variables can be declared:
Java Methods By J. W. Rider. Java Methods Modularity Declaring methods –Header, signature, prototype Static Void Local variables –this Return Reentrancy.
Chapter 4: Writing Classes Presentation slides for Java Software Solutions for AP* Computer Science by John Lewis, William Loftus, and Cara Cocking Java.
© 2011 Pearson Education, publishing as Addison-Wesley Chapter 4: Writing Classes Presentation slides for Java Software Solutions for AP* Computer Science.
Chapter 5 - Writing a Problem Domain Class Definition1 Chapter 5 Writing a Problem Domain Class Definition.
DECOMPOSITION. KEY TERMS  Structured programming  Functionality  Structure Charts  Stepwise refinement  Modularity.
Chapter 3: Developing Class Methods Object-Oriented Program Development Using Java: A Class-Centered Approach.
Tuc Goodwin  Object and Component-Oriented Programming  Classes in C#  Scope and Accessibility  Methods and Properties  Nested.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
Chapter 4 -2 part Writing Classes 5 TH EDITION Lewis & Loftus java Software Solutions Foundations of Program Design © 2007 Pearson Addison-Wesley. All.
ECE122 Feb. 22, Any question on Vehicle sample code?
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
JAVA Classes Review. Definitions Class – a description of the attributes and behavior of a set of computational objects Constructor – a method that is.
 Classes in c++ Presentation Topic  A collection of objects with same properties and functions is known as class. A class is used to define the characteristics.
1 Chapter Four Creating and Using Classes. 2 Objectives Learn about class concepts How to create a class from which objects can be instantiated Learn.
8. Inheritance “Is-a” Relationship. Topics Creating Subclasses Overriding Methods Class Hierarchies Abstract Class Inheritance and GUIs The Timer Class.
CSCI 3328 Object Oriented Programming in C# Chapter 9: Classes and Objects: A Deeper Look – Exercises 1 Xiang Lian The University of Texas Rio Grande Valley.
Chapter 6 - More About Problem Domain Classes1 Chapter 6 More About Problem Domain Classes.
Classes - Intermediate
AP Java Ch. 4 Review Question 1  Java methods can return only primitive types (int, double, boolean, etc).
5.1 Basics of defining and using classes A review of class and object definitions A class is a template or blueprint for an object A class defines.
1 Chapter 4: Writing Classes  Chapter 4 focuses on: class definitions encapsulation and Java modifiers method declaration, invocation, and parameter passing.
1 Sections 6.4 – 6.5 Methods and Variables Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Java 5 Class Anatomy. User Defined Classes To this point we’ve been using classes that have been defined in the Java standard class library. Creating.
Review for Test2. Scope 8 problems, 60 points. 1 Bonus problem (5 points) Coverage: – Test 1 coverage – Exception Handling, Switch Statement – Array of.
Copyright © 2012 Pearson Education, Inc. Chapter 4 Writing Classes : Review Java Software Solutions Foundations of Program Design Seventh Edition John.
The Object-Oriented Thought Process Chapter 03
Objects as a programming concept
Chapter 4: Writing Classes
Chapter 4: Writing Classes
Haidong Xue Summer 2011, at GSU
Intro To Classes Review
Agenda Warmup AP Exam Review: Litvin A2
Chapter 3: Using Methods, Classes, and Objects
Chapter 5 Functions DDC 2133 Programming II.
Chapter 4: Writing Classes
Lecture 14 Writing Classes part 2 Richard Gesick.
Methods The real power of an object-oriented programming language takes place when you start to manipulate objects. A method defines an action that allows.
Can perform actions and provide communication
Can perform actions and provide communication
Chapter 5 Function Basics
Chapter 4 (part 2).
Group Status Project Status.
Classes, Encapsulation, Methods and Constructors (Continued)
CSCI 3328 Object Oriented Programming in C# Chapter 9: Classes and Objects: A Deeper Look – Exercises UTPA – Fall 2012 This set of slides is revised from.
Chapter 4 Writing Classes.
Can perform actions and provide communication
Chap 1 Chap 2 Chap 3 Chap 5 Surprise Me
Which best describes the relationship between classes and objects?
CIS16 Application Development and Programming using Visual Basic.net
Notes from Week 5 CSE 115 Spring 2006 February 13, 15 & 17, 2006.
ENERGY 211 / CME 211 Lecture 17 October 29, 2008.
Corresponds with Chapter 5
Presentation transcript:

Chapter 4 Test Review First day 24 Multiple Choice Questions (1 point each) 12 True/False (1 point each) Second day 7 Short answer (points vary, 36 points total) 72 points total

Test Topics - 1 Relationship between class and object Classes calling other classes What defines an object’s behavior? Defining classes, instantiation, instance data Do you always need a class constructor? Do you need a “main” method in a class? Class methods Calling Writing Encapsulation variable scope Within a method or class Global, private, public data & methods

Test Topics - 2 Methods Trace program flow with method calls Returning parameters from a method Do you always need a return statement? How to overload signatures decomposition Do you need anything in the body of a method? Formal and actual parameters (arguments) What is allowed to be passed as an argument? Widening in the argument of a method call Trace program flow with method calls Interpreting code (what does it do)

Test Topics - 3 Review these classes Short answer String Coin (pp. 194-195) Die (pp. 213-214) Short answer Writing constructors, methods Writing headers