CSE 301 Exam Revision Lecture - PowerPoint PPT Presentation


PPT – CSE 301 Exam Revision Lecture PowerPoint presentation | free to view - id: 7365e1-YjY2Y


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation

CSE 301 Exam Revision Lecture


CSE 301 Exam Revision Lecture harry.erwin_at_sunderland.ac.uk james.malone_at_sunderland.ac.uk – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 26
Provided by: cs065


Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: CSE 301 Exam Revision Lecture

CSE 301 Exam Revision Lecture
  • harry.erwin_at_sunderland.ac.uk
  • james.malone_at_sunderland.ac.uk

Exam Format
  • Wednesday, 18 May
  • 930-1230
  • Seaburn Centre
  • 14 Questions in total, Three sections
  • OO Programming (6 questions)
  • OO Theory (4 questions)
  • OO Practice (4 questions)
  • Answer TEN questions, with at least TWO from each

Specific Advice
  • Know your Java syntax (ch 2-3, JiaN)
  • Know how to use the Collection classes
  • Know the basic patterns from the Pattern book
  • Know how Java implements the concepts of OO
  • Know the concepts, principles and theory of OO
  • Know how to use UML
  • Know the risks and practices discussed in the
  • Understand the practices of XP

Basic Programming Topics
  • Java Operators and Syntax
  • Primitive Types (definitions and conversion)
  • Reference Types (including the Object class)
  • Access Modifiers
  • Inner Classes
  • Iterators
  • Interfaces
  • Constructors Constructor Chaining

Intermediate and Advanced Programming Topics
  • Input/Output
  • Exception Handling
  • Collection Classes
  • Threads and Semaphores
  • Swing and AWT
  • Interfacing to the Internet, Serialization, and
  • Patterns
  • Garbage Collection

Theory Topics
  • Definitions (Object, System, etc.)
  • Interface Segregation Principle (ISP)
  • Open-Closed Principle (OCP)
  • Liskov Substitution Principle (LSP)
  • Dependency Inversion Principle (DIP)
  • Single-Responsibility Principle (SRP)
  • Meyers Design By Contract
  • Encapsulation, Inheritance, Subtype-Polymorphism

Practice Topics
  • UML (eg Class diagrams, state charts, use cases,
    interaction diagrams, etc.)
  • Bad Software Design (when software smells)
  • Design Patterns
  • Modelling Classes
  • Requirements Analysis
  • Software Maintainability
  • The Text in General
  • Refactoring, TDD, XP

Questions from the Past
  • Name and describe the 8 primitive types
  • Boolean, char, etc.
  • How is a type conversion done?
  • When is it suitable (think data loss)?
  • Wrapper classes
  • Describe the three categories of reference data
    types (that inherit from Object).
  • Class instance, array, interface

Questions from the Past
  • Name the methods Object class provides
  • toString(), clone(), getClass(), equals(), etc.
  • How is a class instantiated?
  • Simple code
  • public Balance currentBalance new Balance()
  • What is a static method?
  • Method not associated with an instance but
    rather at class level

Questions from the Past
  • Describe 4 access modifiers
  • Remember table!

Accessible to Public Protected Package Private
Defining Class Yes Yes Yes Yes
Class in same package Yes Yes Yes No
Subclass in different package Yes Yes No No
Non-sublcass different package Yes No No No
Questions from the Past
  • What is an inner class and how is it used?
  • Class within a class
  • Static Member class
  • Member class
  • Local class
  • Anonymous class

Questions from the Past
  • What is an iterator
  • Allow processing (step through) of each element
    of a collection
  • Sample code has been asked for!
  • Iterator myIterator myCollection.iterator()
  • while(myIterator.hasNext())
  • Object myObject myIterator.next()
  • //do something with myObject possibly cast

Questions from the Past
  • What is an interface?
  • a collection of method definitions and constant
    values that define a behaviour
  • Replace multiple inheritance more than one
    interface can be inherited.
  • Does not implement methods however
  • What is a thread?
  • a separate stream of execution that takes place
    simultaneously with and independently of
    everything else remember Thread class and
    Runnable interface

Questions from the Past
  • What is an Exception? How is it dealt with in
  • An Exception is an object created and thrown when
    an exceptional circumstance (usually caused by an
    erroneous condition) occurs
  • Java try, catch, throw, throws, finally
  • Know the different types of Exceptions and how
    the compiler enforces them.

Questions from the Past
  • What is a constructor?
  • General description, code example might help
  • What is constructor chaining?
  • A child object constructor always first needs to
    construct its parent (which in turn calls its
    parent constructor.). Can also be manufactured
    by enforcing other constructors to be called
    within the same or parent classes
  • Use of this, this(), super, and super()

Questions from the Past
  • Describe the Interface Segregation Principle
  • Many client specific interfaces (narrow) are
    better than one general purpose interface
  • Fat interfaces lead to inadvertent coupling
  • Describe the Liskov Substitution Principle (LSP)?
  • Subclasses should be suitable for their base
  • The contract of the base class must be honoured
    by the derived class

Questions from the Past
  • What is the Open-Closed Principle (OCP)?
  • A module (class) should be open for extension but
    closed for modification (originally by Bertrand
  • Classes should be written so that they can be
    extended without requiring the classes to be
  • To extend the behavior of a system (in response
    to a requested change) add new code, dont modify
    existing code.

Questions from the Past
  • Describe the Dependency Inversion Principle (DIP)
  • Depend upon abstractions. Do not depend upon
    concrete implementations
  • High level classes should not depend on low level
  • Abstractions should not depend upon the details.
  • If the high level abstractions depend on the low
    level implementation details, then the dependency
    is inverted from what it should be.

Questions from the Past
  • Describe the Single-Responsibility Principle
  • A class should have only one reason to change
  • A responsibility is a reason for change.
  • The responsibilities of a class are axes of
    change. If it has two responsibilities, they are
    coupled in the design, and so have to change

Questions from the Past
  • Meyers Design By Contract (later version)
  • A contract consists of the preconditions a method
    expects and the post-conditions it guarantees if
    it returns successfully.
  • If the method doesnt return successfully, it
    throws an exception.
  • The contract is associated with the public
    methods of a class or interface.

Questions from the Past
  • Describe symptoms of bad software design (think
    when software smells)
  • The system is rigidhard to change because
    everything has to change at once.
  • The system is fragilechanges cause the system to
    break in the strangest of places.
  • The system is immobilenot reusable.
  • The system is viscousdoing things right is hard.
  • The system is needlessly complex.
  • The system contains needless repetition.
  • The system is opaquehard to understand

Questions from the Past
  • Describe what is meant by encapsulation
  • Diagram might help
  • Describe what is meant by inheritance
  • Keywords may also help (extends)
  • Describe what is meant by subtype-polymorphism
  • The ability of an object or operator to refer to
    instances of different classes at run time.

Questions from the Past
  • How is abstraction achieved in Java?
  • Various ways Abstract (keyword) classes,
    interfaces and inheritance
  • Describe a State chart / Use Case Diagram / Class
    Diagram / Interaction Diagram
  • Diagram essential key is to remember all
    elements of the diagram
  • Know what theyre used for.

Questions from the Past
  • How might you gather and analyze requirements?
    Compare and contrast the approaches.
  • Brainstorming, Observation etc.
  • Discuss and criticize the design principles the
    authors claim lead to maintainable software
  • Design and conquer
  • Increase cohesion where possible
  • Reduce coupling where possible
  • Keep the level of abstraction as high as possible
  • Increase reusability where possible
  • Reuse existing designs and code where possible
  • Anticipate obsolescence
  • Design for portability
  • Design for testability
  • Design defensively

General Advice
  • Read through whole paper once work out which
    questions you answer best.
  • With 3 hours you have 18 minutes per question
  • Good luck!!!
About PowerShow.com