Introduction to Java - Graphics and Multimedia - Lecture Notes | CS 335, Study notes of Computer Science

Material Type: Notes; Professor: Yang; Class: GRAPHICS AND MULTIMEDIA; Subject: Computer Science; University: University of Kentucky; Term: Fall 2009;

Typology: Study notes

Pre 2010

Uploaded on 10/01/2009

koofers-user-2gu-1
koofers-user-2gu-1 🇺🇸

10 documents

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 335
Graphics and Multimedia
Review I
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Introduction to Java - Graphics and Multimedia - Lecture Notes | CS 335 and more Study notes Computer Science in PDF only on Docsity!

CS 335

Graphics and Multimedia

Review I

What We Have Covered So Far

 Introduction to Java

 Basic Data Type

 Basic Control Structure

 OOP Concept

 GUI

OOP Basic

 Data encapsulation in objects :

 data (attributes)

 methods (behaviors)

 Objects hide information:

 private data/methods

 public interfaces

 Member methods

 Constructor

 Accessor

 Mutator

 Finalizer

Java: Object-Oriented Programming

 Inheritance:

 Advantage

 superclasses and subclasses

 Is-A, Has-A??

 Polymorphism:

 abstract and concrete classes

 Dynamic binding

 The exact type of an objected is determined at run time.

My new

Object

Thread

Object

Event

Object

Abstract

Class

Is-A

Inheritance

Polymorphism

Interfaces

Multiple “Inheritance”

extends

implements

Difference??

Sample Questions

 A(n) class cannot be instantiated.

 An interface may contain:

A. private static data and public abstract methods. B. only public abstract methods. C. public static final data and public abstract methods. D. private static data and public final methods.

 Which of the following is not possible?

A. A class that implements two interfaces. B. A class that inherits from two classes. C. A class that inherits from one class, and implements an interface. D. All of the above are possible.

A Java Screen Layout

Frame  JFrame

Menu Bar (optional)

Content Pane

  • Layout Managers
  • Panels
  • GUI Components

Sample Questions

 Together, the appearance and the way in which the user interacts

with the application are known as that application’s.

 a. abstract window toolkit.  b. look-and-feel.  c. swing factor.  d. All of the above.

 Which pair of words does not complete the sentence below

correctly? A ________ is a ________.

 a. Container, Component.  b. Container, JPanel.  c. JComponent, Container.  d. Component, Object.

 Which layout manager is the default for JFrame?

Sample Questions

 When an exception occurs it is said to have been _____

 When an unchecked exception occurs in a method but is not

caught:

a. the method-call stack is “unwound.” b. the method terminates. c. all local variables in that method go out of scope. d. All of the above.

 After a finally block has finished executing (and there are no

exceptions to be handled):

a. control proceeds to the first statement after the finally block. b. control returns to the throw point. c. the application exits. d. control proceeds to the first statement after the last catch block.

Multi-Threading

 Life Cycle of a Thread

 Thread Scheduling

 Thread Synchronization

 Producer/Consumer

 Multi-threading with GUI

 SwingWorker