Chapter 02 Building Multitier Programs with Classes

Similar documents
Chapter 2. Building Multitier Programs with Classes The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Building Multitier Programs with Classes

Advanced Programming Using Visual Basic 2008

Microsoft Visual Basic 2005: Reloaded

1. A Web Form created in Visual Basic can only be displayed in Internet Explorer. True False

Chapter 12. OOP: Creating Object- Oriented Programs. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.

9/21/2010. Based on Chapter 2 in Advanced Programming Using Visual Basic.NET by Bradley and Millspaugh

VB.NET. Exercise 1: Creating Your First Application in Visual Basic.NET

CGS 2405 Advanced Programming with C++ Course Justification

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.

Introduction to Programming Using Java (98-388)

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class.

Interview Questions of C++

KLiC C++ Programming. (KLiC Certificate in C++ Programming)

Object-Oriented Programming

C++ (Non for C Programmer) (BT307) 40 Hours

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Chapter 5 Object-Oriented Programming

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

Welcome to Teach Yourself Acknowledgments Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p.

Ch02. True/False Indicate whether the statement is true or false.

MaanavaN.Com CS1203 OBJECT ORIENTED PROGRAMMING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Object Oriented Programming

Object Oriented Programming with c++ Question Bank

Public Class ClassName (naming: CPoint)

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

Learning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli

Standard. Number of Correlations


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

XII- COMPUTER SCIENCE VOL-II MODEL TEST I

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

CLASSES AND OBJECTS IN JAVA

And Even More and More C++ Fundamentals of Computer Science

CS 162, Lecture 25: Exam II Review. 30 May 2018

Advanced C++ Programming Workshop (With C++11, C++14, C++17) & Design Patterns

Chapter 12. OOP: Creating Object-Oriented Programs The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Syllabus of C++ Software for Hands-on Learning: This course offers the following modules: Module 1: Getting Started with C++ Programming

CS304 Object Oriented Programming Final Term

Absolute C++ Walter Savitch

RAJIV GANDHI COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY OBJECT ORIENTED PROGRAMMING QUESTION BANK UNIT I 2 MARKS

Preface to the Second Edition Preface to the First Edition Brief Contents Introduction to C++ p. 1 A Review of Structures p.

C++ Important Questions with Answers

Inheritance, and Polymorphism.

Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#)

Advanced C++ Topics. Alexander Warg, 2017

M Introduction to Visual Basic.NET Programming with Microsoft.NET 5 Day Course

2. A GUI A. uses buttons, menus, and icons B. should be easy for a user to manipulate C. both (a) and (b) D. stands for Graphic Use Interaction

Table of Contents Preface Bare Necessities... 17

C#.NET TRAINING / /

STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING

Understanding Inheritance and Interfaces

Get Unique study materials from

Course Description. Learn To: : Intro to JAVA SE7 and Programming using JAVA SE7. Course Outline ::

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

Chapter 12: How to Create and Use Classes


2559 : Introduction to Visual Basic.NET Programming with Microsoft.NET

VB.NET Web : Phone : INTRODUCTION TO NET FRAME WORK

AN OVERVIEW OF C++ 1

Object-Oriented Programming (OOP) Fundamental Principles of OOP

B.C.A 2017 OBJECT ORIENTED PROGRAMMING USING C++ BCA303T MODULE SPECIFICATION SHEET

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year

ENCAPSULATION. private, public, scope and visibility rules. packages and package level access.

Java Programming Training for Experienced Programmers (5 Days)

KOM3191 Object Oriented Programming Dr Muharrem Mercimek OPERATOR OVERLOADING. KOM3191 Object-Oriented Programming

Lecture 5: Inheritance

Framework Fundamentals

Object Oriented Programming. Solved MCQs - Part 2

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

DIPLOMA IN PROGRAMMING WITH DOT NET TECHNOLOGIES

VALLIAMMAI ENGINEERING COLLEGE

CIS Intro to Programming in C#

.Net. Course Content ASP.NET

What does it mean by information hiding? What are the advantages of it? {5 Marks}

Object Oriented Programming

Chapter 11 Object and Object- Relational Databases

Intro to OOP Visibility/protection levels and constructors Friend, convert constructor, destructor Operator overloading a<=b a.

CO Java SE 8: Fundamentals

C# Programming in the.net Framework

Test iz programskog jezika C# - ASP Izaberite tačan odgovor. Student's name : Programiranje ASP C# 1) A local variable

Real Time & Embedded Linux Solutions. C++ and OOD for Embedded Systems. משך הקורס 40 שעות לימוד ותרגול בשיטת Hands-on-Training

C++ (classes) Hwansoo Han

Written by John Bell for CS 342, Spring 2018

5/23/2015. Core Java Syllabus. VikRam ShaRma

EEE-425 Programming Languages (2013) 1

QUESTIONS FOR AVERAGE BLOOMERS

More C++ : Vectors, Classes, Inheritance, Templates

END TERM EXAMINATION

OVERVIEW ENVIRONMENT PROGRAM STRUCTURE BASIC SYNTAX DATA TYPES TYPE CONVERSION

More C++ : Vectors, Classes, Inheritance, Templates. with content from cplusplus.com, codeguru.com

VB.NET MOCK TEST VB.NET MOCK TEST I

EEE-425 Programming Languages (2013) 1

C++ PROGRAMMING LANGUAGE: CLASSES. CAAM 519, CHAPTER 13

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING CS6456 OBJECT ORIENTED PROGRAMMING

Inheritance. A mechanism for specialization A mechanism for reuse. Fundamental to supporting polymorphism

An Object Oriented Programming with C

Classes. Christian Schumacher, Info1 D-MAVT 2013

100%_Placement_Program - Hackveda

Transcription:

Chapter 02 Building Multitier Programs with Classes Student: 1. 5. A method in a derived class overrides a method in the base class with the same name. 2. 11. The Get procedure in a class module is used to assign a value to a property. Ans: F 3. 16. When an error occurs, the system throws an exception. 4. 20. By default each VB project has a namespace that matches the project name.

5. 24. Objects and variables that no longer have any active reference in a program will be destroyed by VB.NET's Recycle Bin. Ans: F 6. 7. When you create your own class module, it can be used in multiple projects. 7. To create a read-only property in a class module, use the ReadOnly modifier and write only the Set portion of the property procedure. Ans: F 8. You do not usually need to write a destructor for your class. 9. 18. You can use an ErrorProvider component for displaying a message to the user, rather than a message box.

10. 23. The lifetime of a namespace variable is as long as the program is running. 11. 31. makes it possible to accomplish data hiding. A. Abstraction B. Encapsulation C. Inheritance D. Polymorphism Ans: B 12. 35. Which of the following is NOT one of the tiers discussed in the three-tier model for application design? A. Programming tier B. Presentation tier C. Data tier D. Business tier Ans: A

13. 38. A(n) is a method that will automatically execute when an object is instantiated. A. overloaded method B. constructor C. parameter D. destructor Ans: B 14. 44. The is the area of the program that can "see" a variable or constant. A. parameter B. namespace C. form module D. scope Ans: D 15. 41. Microsoft recommends that you use the class when you write code to catch errors in your programs. A. System.Collections.Exception B. System.IO.Exception C. System.ApplicationException D. System.Windows.Forms.Exception Ans: C

16. 34. When a single class has more than one method with the same name, but a different argument list, this is called a(n) method. A. overloaded B. abstract C. inherited D. derived Ans: A 17. 43. Instead of using Parse, you can use the method, which will convert the numeric value to zero if the conversion fails. A. Parsed B. TryParse C. Parsing D. DoParse Ans: B 18. Which of the following does not define a scope for variables or constants in VB.NET? A. procedure level B. module level C. global D. namespace Ans: C

19. Which keyword defines a variable or class that is accessible from anywhere inside this class or any class that inherits from this class? A. Public B. Private C. Protected D. Friend Ans: C 20. You can create your own enumeration by using the statement. A. MyBase.New() B. Enum C. Sub New() D. Enumeration Ans: B 21. What is the purpose of a Property Get procedure? Ans: A Property Get procedure retrieves a property value. The Get allows the value to be available to code outside the class.

22. What is the lifetime of a variable? How long is the lifetime of a namespace-level, a module-level, and a procedure-level variable? he lifetime of a variable, including object variables, is as long as the variable remains in scope. The lifetime of a namespace-level variable is as long as the program is running. The lifetime of a module-level variable is as long as any reference to the class remains. The lifetime of a procedure-level variable is one execution of the procedure. 23. What is the code that would create an enumerator for bed sizes that include king, queen, double, and twin? Ans: (/ represents a new line) Public Enum Bedsize / King / Queen / Double / Twin / End Enum

Chapter 02 Building Multitier Programs with Classes Key 1. (p. 52) 5. A method in a derived class overrides a method in the base class with the same name. 2. (p. 55) 11. The Get procedure in a class module is used to assign a value to a property. Ans: F

3. (p. 60) 16. When an error occurs, the system throws an exception. 4. (p. 74) 20. By default each VB project has a namespace that matches the project name. 5. (p. 83) 24. Objects and variables that no longer have any active reference in a program will be destroyed by VB.NET's Recycle Bin. Ans: F

6. (p. 53) 7. When you create your own class module, it can be used in multiple projects. 7. (p. 56) To create a read-only property in a class module, use the ReadOnly modifier and write only the Set portion of the property procedure. Ans: F 8. (p. 56) You do not usually need to write a destructor for your class.

9. (p. 63) 18. You can use an ErrorProvider component for displaying a message to the user, rather than a message box. 10. (p. 76) 23. The lifetime of a namespace variable is as long as the program is running.

11. (p. 50) 31. makes it possible to accomplish data hiding. A. Abstraction B. Encapsulation C. Inheritance D. Polymorphism Ans: B 12. (p. 53) 35. Which of the following is NOT one of the tiers discussed in the three-tier model for application design? A. Programming tier B. Presentation tier C. Data tier D. Business tier Ans: A

13. (p. 56) 38. A(n) is a method that will automatically execute when an object is instantiated. A. overloaded method B. constructor C. parameter D. destructor Ans: B 14. (p. 74) 44. The is the area of the program that can "see" a variable or constant. A. parameter B. namespace C. form module D. scope Ans: D

15. (p. 61) 41. Microsoft recommends that you use the class when you write code to catch errors in your programs. A. System.Collections.Exception B. System.IO.Exception C. System.ApplicationException D. System.Windows.Forms.Exception Ans: C 16. (p. 52) 34. When a single class has more than one method with the same name, but a different argument list, this is called a(n) method. A. overloaded B. abstract C. inherited D. derived Ans: A

17. (p. 63) 43. Instead of using Parse, you can use the method, which will convert the numeric value to zero if the conversion fails. A. Parsed B. TryParse C. Parsing D. DoParse Ans: B 18. (p. 74) Which of the following does not define a scope for variables or constants in VB.NET? A. procedure level B. module level C. global D. namespace Ans: C

19. (p. 77) Which keyword defines a variable or class that is accessible from anywhere inside this class or any class that inherits from this class? A. Public B. Private C. Protected D. Friend Ans: C 20. (p. 82) You can create your own enumeration by using the statement. A. MyBase.New() B. Enum C. Sub New() D. Enumeration Ans: B

21. (p. 55) What is the purpose of a Property Get procedure? Ans: A Property Get procedure retrieves a property value. The Get allows the value to be available to code outside the class. 22. (p. 76) What is the lifetime of a variable? How long is the lifetime of a namespace-level, a module-level, and a procedure-level variable? he lifetime of a variable, including object variables, is as long as the variable remains in scope. The lifetime of a namespace-level variable is as long as the program is running. The lifetime of a module-level variable is as long as any reference to the class remains. The lifetime of a procedure-level variable is one execution of the procedure. 23. (p. 82) What is the code that would create an enumerator for bed sizes that include king, queen, double, and twin? Ans: (/ represents a new line) Public Enum Bedsize / King / Queen / Double / Twin / End Enum

Chapter 02 Building Multitier Programs with Classes Summary Category # of Questions 11 12