Chapter 2. Ans. C (p. 55) 2. Which is not a control you can find in the Toolbox? A. Label B. PictureBox C. Properties Window D.

Similar documents
The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear.

Chapter 2. Creating Applications with Visual Basic Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of

CIS 3260 Intro. to Programming with C#

Dive Into Visual C# 2010 Express

Your First Windows Form

EEE-425 Programming Languages (2013) 1

Dive Into Visual C# 2008 Express

EEE-425 Programming Languages (2013) 1

Introductionto the Visual Basic Express 2008 IDE

Lesson 04. Control Structures I : Decision Making. MIT 31043, VISUAL PROGRAMMING By: S. Sabraz Nawaz

Programming in C# Project 1:

CST242 Windows Forms with C# Page 1

INFORMATICS LABORATORY WORK #4

CALCULATOR APPLICATION

Full file at

Full file at Programming in Visual Basic 2010

Tutorial 3 - Welcome Application

Skinning Manual v1.0. Skinning Example

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

Interface Design in C#

Quick Guide for the ServoWorks.NET API 2010/7/13

MATFOR In Visual C# ANCAD INCORPORATED. TEL: +886(2) FAX: +886(2)

Chapter 13: Handling Events

Overview Describe the structure of a Windows Forms application Introduce deployment over networks

Typescript on LLVM Language Reference Manual

Chapter 2: Introduction to C++

Chapter 2: Special Characters. Parts of a C++ Program. Introduction to C++ Displays output on the computer screen

In this exercise you will gain hands-on experience using STK X to embed STK functionality in a container application created with C#.

Unit 3. Lesson Designing User Interface-2. TreeView Control. TreeView Contol

Tutorial - Hello World

Chapter 2 Exploration of a Visual Basic.Net Application

Chapter Two MULTIPLE CHOICE

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

Visual C# Program: Simple Game 3

CHAPTER 3 BASIC INSTRUCTION OF C++

We assume that the user has basic knowledge of C# and is able to create a new C# project.

Decision Making in C

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

IBSDK Quick Start Tutorial for C# 2010

Introduction. Programming and

Visual C#.NET. Copyright: Home and Learn This Edition: November 2013 Author: Ken Carney. All rights reserved

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

Form Properties Window

Introduction to the Visual Basic Express 2005IDE

Unit 1 Workbook ICS3U

In this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics.

Starting Out with C++: Early Objects, 9 th ed. (Gaddis, Walters & Muganda) Chapter 2 Introduction to C++ Chapter 2 Test 1 Key

Lec 3. Compilers, Debugging, Hello World, and Variables

Click on the empty form and apply the following options to the properties Windows.

Amyuni PDF Creator for ActiveX

Text box. Command button. 1. Click the tool for the control you choose to draw in this case, the text box.

LESSON B. The Toolbox Window

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Understanding Events in C#

4. Structure of a C++ program

Lecture 2 Tao Wang 1

The C++ Language. Arizona State University 1

Developing for Mobile Devices Lab (Part 1 of 2)

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program

Rock-Paper-Scissors Multiple versions Nested If / Else If / Else Random Numbers

Class Test 5. Create a simple paint program that conforms to the following requirements.

Porting your Dyalog Application to Internet

Introduction to Bioinformatics

CSC 307 DATA STRUCTURES AND ALGORITHM ANALYSIS IN C++ SPRING 2011

Advanced Programming C# Lecture 2. dr inż. Małgorzata Janik

You can call the project anything you like I will be calling this one project slide show.

Module 4: Data Types and Variables

Instructions for writing Web Services using Microsoft.NET:

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

CHAPTER 3. Writing Windows C# Programs. Objects in C#

Control Structures. Lecture 4 COP 3014 Fall September 18, 2017

Computer Programming, I. Laboratory Manual. Final Exam Solution

1. What type of error produces incorrect results but does not prevent the program from running? a. syntax b. logic c. grammatical d.

Key Differences Between Python and Java

Gaddis: Starting Out with Java: From Control Structures through Objects, 6/e

Introduction. Create a New Project. Create the Main Form. Assignment 1 Lights Out! in C# GUI Programming 10 points

4. If the following Java statements are executed, what will be displayed?

Understanding main() function Input/Output Streams

Getting Started with IVI-COM Drivers for the Lambda Genesys Power Supply

Language Reference Manual

Menus and Printing. Menus. A focal point of most Windows applications

Visual BASIC Creating an Application. Choose File New Project from the menu

Start Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II)

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

FDSc in ICT. Building a Program in C#

Module 9: Validating User Input

REVIEW OF CHAPTER 1 1

Visual C# Program: Resistor Sizing Calculator

Tutorial 03 understanding controls : buttons, text boxes

Gathering and Modifying Real-Time Software Data in a Visual Studio Environment Mark Rogers November 6, 2008

Chapter 6 Sub Procedures

1. Windows Forms 2. Event-Handling Model 3. Basic Event Handling 4. Control Properties and Layout 5. Labels, TextBoxes and Buttons 6.

Flag Quiz Application

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

Computers, Variables and Types. Engineering 1D04, Teaching Session 2

Java Bytecode (binary file)

Annotation File Specification

3 Customer records. Chapter 3: Customer records 57

Object-Oriented Software Engineering CS288

Transcription:

Chapter 2 Multiple Choice 1. According to the following figure, which statement is incorrect? A. The size of the selected object is 300 pixels wide by 300 pixels high. B. The name of the select object is Form1. C. The object s title bar is set to be blank. D. The text Form1 will be displayed in the object s title bar. Ans. C (p. 55) 2. Which is not a control you can find in the Toolbox? A. Label B. PictureBox C. Properties Window D. RichTextBox Ans. C (p. 56) 3. To create a Label control you can. A. right-click and drag a Label control from the Toolbox onto the form. B. double-click the Label control. C. right-click the Label control. D. right-click the Toolbox and select Label. Ans. B (p. 58) 4. Which is a legal identifier for a Label control? A. My_label_123 B. 123_My_label C. 123Mylabel D. My/label/123 Ans. A (p. 61)

5. Which figure can produce the following? A. B. C. D. None of the above

Ans. C (p. 65) 6. The file contains the application s start-up code, which executes when the application runs. A. Program.cs B. Form1.cs C. Form1.Designer.cs D. Form1.resx Ans. A (p. 67) 7. C# code is primarily organized in three ways: namespace, classes, and methods. Which statement is correct? A. A namespace is a container that holds methods. B. A class is a container that holds namespaces. C. A method is a container that holds namespaces and classes. D. None of the above. Ans. D (p 67) 8. In C#, namespaces, classes, and methods use to enclose code. A. brackets ([ ]) B. parentheses ( () ) C. braces ({ ) D. less than (<) and greater than (>) Ans. C (p. 69) 9. According to the following code segment, the event handler s name is. private void button1_click(object sender, EventArgs e) { A. button1_click B. button1 C. Click D. sender Ans. A (p. 72) 10. Which can display a message box with the string literal Hello in it? A. MessageBox( Hello ); B. MessageBox.Show( Hello ); C. Message.Show( Hello ); D. Message( Hello ); Ans. B (p. 78) 11. Which is the correct way to assign the string Hello to a control s Text property? A. controlname.text == Hello ;

B. controlname.text = Hello ; C. Hello == controlname.text; D. Hello = controlname.text; Ans. B (p. 83) 12. Which value of the SizeMode property of a PictureBox control resizes the image both horizontally and vertically to fit in the PictureBox control? A. Normal B. StretchImage C. AutoSize D. Zoom Ans. B (p. 94) 13. Which can make the image of a PictureBox control invisible? A. myimage.visible = 0 B. myimage.visible = false C. myimage.visible = none ; D. myimage.visible = no ; Ans. B (p. 99) 14. Which is not a correct way to add comments to C# code? A. { //my comment B. { /* my comment */ C. { /* my comment */ D. { //my comment

Ans. B (p 104) 15. Which can close an application s form by clicking a Button control that has an identifier button1? A. private void button1_click(object sender, EventArgs e) { this.close(); B. private void button1_click(object sender, EventArgs e) { this.exit(); C. private void button1_click(object sender, EventArgs e) { this.stop(); D. private void button1_click(object sender, EventArgs e) { this.destroy(); Ans. A (p. 107) True/False 1. Changing an object s Text property will change its name as well. Ans. False (p. 56) 2. To create a Button control, you can click and drag a Button control from the Toolbox onto the form. Ans. True (p. 58) 3. A Label control typically has its BorderStyle property set to FixedSingle by default. Ans. False (p. 82) 4. The AutoSize property is a Boolean property which means that it can be set to one of two possible values: True or False. Ans. True (p. 83) 5. In C#, the double equal sign (==) is the assignment operator which can assign the value that appears on its right side to the item that appears on its left side. Ans. False (p. 85) 6. The Text property of a PictureBox control can accept all types of data such as string, number, and Boolean values. Ans. False (p. 87) 7. You can clear the text that is displayed in a Label control by assigning an empty string ( ). Ans. True (p. 87) 8. AutoCoding is a feature of Visual Studio that provides automatic code completion as you write programming statements. Ans. False (p. 91) 9. In C#, you can begin a line comment with two backward slashes (\\). Ans. False (p. 104) 10. Visual C# programmers cannot use indentation to organize code because it will cause compiler errors. Ans. False (p. 105)