Exam Duration: 2hrs and 30min Software Design

Similar documents
1. Which of the following is the correct expression of character 4? a. 4 b. "4" c. '\0004' d. '4'

I pledge by honor that I will not discuss this exam with anyone until my instructor reviews the exam in the class.

Object Orientated Analysis and Design. Benjamin Kenwright

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Practice Questions for Final Exam: Advanced Java Concepts + Additional Questions from Earlier Parts of the Course

Full download all chapters instantly please go to Solutions Manual, Test Bank site: testbanklive.com

CS111: PROGRAMMING LANGUAGE II

CS 113 PRACTICE FINAL

EXAMINATION FOR THE BSC (HONS) INFORMATION TECHNOLOGY; BSC (HONS) INFORMATION SYSTEMS & BSC (HONS) COMPUTER SCIENCE; YEAR 1

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide

Java Object Oriented Design. CSC207 Fall 2014

CS 251 Intermediate Programming Inheritance

OBJECT ORİENTATİON ENCAPSULATİON

Software design and Implementation 1/6. Software Design and Implementation. Sample Final Exam

Chapter 7. Inheritance

Inheritance, Polymorphism, and Interfaces

CSCI 136 Written Exam #0 Fundamentals of Computer Science II Spring 2013

ECE 461 Fall 2011, Final Exam

CO Java SE 8: Fundamentals

CS100J, Fall 2003 Preparing for Prelim 1: Monday, 29 Sept., 7:30 9:00PM

Java Class Design. Eugeny Berkunsky, Computer Science dept., National University of Shipbuilding

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5

CLASS DESIGN. Objectives MODULE 4

Questions Answer Key Questions Answer Key Questions Answer Key

Arrays Classes & Methods, Inheritance

CE221 Programming in C++ Part 1 Introduction

Inheritance. Unit 8. Summary. 8.1 Inheritance. 8.2 Inheritance: example. Inheritance Overriding of methods and polymorphism The class Object

Module Contact: Dr Taoyang Wu, CMP Copyright of the University of East Anglia Version 1

Exercise 6 Multiple Inheritance, Multiple Dispatch and Linearization November 3, 2017

CS 110 Practice Final Exam originally from Winter, Instructions: closed books, closed notes, open minds, 3 hour time limit.

C++ Important Questions with Answers

QUIZ 2 Introduction to Computer Science (COMP 250) Mon. March 2, 2009 Professor Michael Langer

OVERRIDING. 7/11/2015 Budditha Hettige 82

Homework 2 Implementing the University Application Due: November 7, 2004 (Sunday midnight)

HAS-A Relationship. Association is a relationship where all objects have their own lifecycle and there is no owner.

Introduction to Programming Using Java (98-388)

Programming Language Concepts Object-Oriented Programming. Janyl Jumadinova 28 February, 2017

Instance Members and Static Members

COP 3330 Final Exam Review

CS 101 Exam 2 Spring Id Name

Lecture Contents CS313D: ADVANCED PROGRAMMING LANGUAGE. What is Inheritance?

Subclass Gist Example: Chess Super Keyword Shadowing Overriding Why? L10 - Polymorphism and Abstract Classes The Four Principles of Object Oriented

HAS-A Relationship. If A uses B, then it is an aggregation, stating that B exists independently from A.

Module Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1

Inheritance and Polymorphism

EECS 1001 and EECS 1030M, lab 01 conflict

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value

CS313D: ADVANCED PROGRAMMING LANGUAGE

Chapter 4 Defining Classes I

F I N A L E X A M I N A T I O N

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance

CS313D: ADVANCED PROGRAMMING LANGUAGE

Inheritance, and Polymorphism.

Classes and Inheritance Extending Classes, Chapter 5.2

Midterm assessment - MAKEUP Fall 2010

CS111: PROGRAMMING LANGUAGE II

What are the characteristics of Object Oriented programming language?

Inheritance and Interfaces

CS260 Intro to Java & Android 03.Java Language Basics

Object Oriented Design Final Exam (From 3:30 pm to 4:45 pm) Name:

UMBC CMSC 331 Final Exam Section 0101 December 17, 2002

Computer Science 225 Advanced Programming Siena College Spring Topic Notes: Inheritance

CS 101 Exam 1 Spring 200 Id Name

CS 320 Introduction to Software Engineering Spring 2017

University of Palestine. Mid Exam Total Grade: 100

POLYTECHNIC OF NAMIBIA SCHOOL OF COMPUTING AND INFORMATICS DEPARTMENT OF COMPUTER SCIENCE

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

Ministry of Higher Education Colleges of Applied Sciences Final Exam Academic Year 2009/2010. Student s Name

CMSC 132: Object-Oriented Programming II. Inheritance

Software and Programming I. Classes and Arrays. Roman Kontchakov / Carsten Fuhs. Birkbeck, University of London

CMSC 331 Second Midterm Exam

Class, Variable, Constructor, Object, Method Questions

A506 / C201 Computer Programming II Placement Exam Sample Questions. For each of the following, choose the most appropriate answer (2pts each).

Lesson 10B Class Design. By John B. Owen All rights reserved 2011, revised 2014

Type Hierarchy. Lecture 6: OOP, autumn 2003

Computer Science II (20073) Week 1: Review and Inheritance

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

OO System Models Static Views

9/10/2018 Programming Data Structures Inheritance

Exercise 6 Multiple Inheritance, Multiple Dispatch and Linearization November 3, 2017

Introduction to Java. Handout-1d. cs402 - Spring

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

Informatik II. Tutorial 6. Mihai Bâce Mihai Bâce. April 5,

Topic 7: Inheritance. Reading: JBD Sections CMPS 12A Winter 2009 UCSC

UMBC CMSC 331 Final Exam

Example: Count of Points

FINAL TERM EXAMINATION SPRING 2010 CS304- OBJECT ORIENTED PROGRAMMING

The Sun s Java Certification and its Possible Role in the Joint Teaching Material

SEEM4570 System Design and Implementation. Lecture 11 From Design to Implementation

1- Differentiate between extends and implements keywords in java? 2- What is wrong with this code:

C a; C b; C e; int c;

Module Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1

public UndergradStudent(String n, String m, String p) { programme = p; super(n, m);

A base class (superclass or parent class) defines some generic behavior. A derived class (subclass or child class) can extend the base class.

Object Oriented Programming. Solved MCQs - Part 2

ITI Introduction to Computing II

Method Overriding in Java

INHERITANCE & POLYMORPHISM. INTRODUCTION IB DP Computer science Standard Level ICS3U. INTRODUCTION IB DP Computer science Standard Level ICS3U

Day 3. COMP 1006/1406A Summer M. Jason Hinek Carleton University

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

Transcription:

Exam Duration: 2hrs and 30min. 433-254 Software Design Section A Multiple Choice (This sample paper has less questions than the exam paper The exam paper will have 25 Multiple Choice questions.) 1. Which of the following statements is true: A) Java doesn t support inheritance B) Java supports multiple inheritance C) Java supports interfaces D) Java supports polymorphism E) C and D 2. The following diagram indicates: Student * Takes 0..5 Subject A) A student can take exactly 5 subjects B) A student can take zero or up to 5 subjects C) A subject can be taken by zero or up to 5 students D) A subject can be taken by 0 or more students E) B and D 3. Consider the following method: public void myfunc() { static int a = 20; System.out.println(a++); the value printed by the myfunc() method during its 2 nd invocation is: A) 20; B) 21 C) 22 D) 19 E) None of the Above Page 1 of 5

4. What is the most expensive phase in a software development life cycle? A) Design B) Maintenance C) Implementation D) Analysis E) Testing 5. Which if the following belong to UML behavioral diagrams: A) Cass and object diagram B) Use case diagram and sequence diagram C) Collaboration diagram and state-char diagram E) B and C 6. What will the main method of the following Java class E print? class C { public int x = 1; public C(int i) { x += i; class D extends C { public D(int i) { super(i); x += i; class E { public static void main(string argv[]) { C ar[] = new C[2]; ar[0] = new C(1); ar[1] = new D(2); System.out.println(ar[0].x + ar[1].x); A) 2 B) 3 C) 5 D) 7 E) this program will not compile Page 2 of 5

7. Which of the following is a valid method to indicate comments in Java? A) // comment to end of line B) /* comment */ C) # comment to end of line E) A and C 8. What keyword is used in Java to define a constant? A) static B) final C) abstract D) public E) private 9. Which of the following UML diagrams is part of UML structural diagram? A) Class diagram B) Sequence Diagram C) Object Diagram E) A and C 10. A polymorphic operation: A) is one which is grouped together with the datatype it operates on B) can operate on different sorts of data C) must inherit its implementation from another class D) A and C E) B and C Page 3 of 5

Section B Short Answer 1. Name five standard packages supported by Java and discuss them briefly. 2. Companies may employ many people, and people may work for many companies. Every employee in a company has a manager who may manage many subordinate employees. Show the relationship between the Employee and Company class in UML. 3. What is sequence diagram? When is it appropriate to use this diagram? 4. Explain the meaning of the following terms. (a) method overloading (b) Method overriding (c) Abstract Class 5. Class A implements the interface B. Represent this in UML. How would you implement this relationship in Java? 6. What are exceptions? Discuss briefly with a suitable example. Page 4 of 5

Section C Long Answer 1. 20 integers are stored in an array intnumbers[ ]. Write a Java application that determines and prints the number of odd, even and zero digits in the array. 2. Implement an abstract class named Person and two subclasses named Student and Employee in Java. A person has a name, address, phone number and e-mail address. A student has a class status (freshman, sophomore, junior or senior). Define the status as a constant. An employee has an office, salary and date-hired. Implement the above classes in Java. Provide Constructors for classes to initialize private variables. Override the tostring method in each class to display the class name and the person s name. Write an application to create objects of type Student and Employee and print the person s name and the class name of the objects. 3. Draw a UML user case diagram and class-diagram for a partial specification of the system described below. Include as much relevant detail from the description as possible on the diagram, including attributes, associations (where possible, use formal notation for describing these) and operations. Details such as type and range of attributes and arguments of operations are not required. A library loans three different kinds of items to customers: books, video tapes and compact disks. Each item has a title, and publisher. In addition, books have an author, and CDs have an artist. The library may have multiple copies of the same book, video tape or compact disk. There are two different kinds of customer: students and staff. For both kinds of customer, the library has their name, sex and address. Students may borrow at most 20 items. Page 5 of 5