Software Exam Flashcards

Prep

1
Q

You are creating an application for computers that run Windows XP or later. This application must run after the computer starts. The user must
not be aware that the application is running.
The application performs tasks that require permissions that the logged-in user does not have.
Which type of application allows this behavior?

A

Windows Service application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

An application presents the user with a graphical interface. The interface includes buttons that the user clicks to perform tasks. Each time the
user clicks a button, a method is called that corresponds to that button.
Which term is used to describe this programming model?

A

Event driven

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does a console-based application differ from a Windows Forms application?

A

Console-based applications do not display a graphical interface.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which type of Windows application presents a parent window that contains child windows?

A

. Multiple-document interface (MDI)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The purpose of a constructor in a class is to:

A

Initialize an object of that class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A class named Manager is derived from a parent class named Employee. The Manager class includes characteristics that are unique to managers.
Which term is used to describe this object-oriented concept?

A

Inheritance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which term is used to describe a class that inherits functionality from an existing class?

A

Derived class

Derived Class: A class that is created from an existing class. The derived class inherits all members and member functions of a base class. The
derived class can have more functionality with respect to the Base class and can easily access the Base class. A Derived class is also called a child
class or subclass.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Two classes named Circle and Square inherit from the Shape class. Circle and Square both inherit Area from the Shape class, but each computes
Area differently.
Which term is used to describe this object-oriented concept?

A

polymorphism

You can use polymorphism to in two basic steps:
Create a class hierarchy in which each specific shape class derives from a common base class.
Use a virtual method to invoke the appropriate method on any derived class through a single call to the base class method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You create an object of type ANumber. The class is defined as follows.

A

. 3

ran with Java
private int _number = 7;
public ANumber() {
}
public ANumber(int number) {
_number = number;
}
public static void main(String[] args) {
ANumber lp = new ANumber(3);
System.out.println(lp._number);
}
}
out put is 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

You need to allow a consumer of a class to modify a private data member.
What should you do?

A

Provide a public function that assigns a value to the data member.

In this example (see below), the Employee class contains two private data members, name and salary. As private members, they cannot be
accessed except by member methods. Public methods named GetName and Salary are added to allow controlled access to the private
members. The name member is accessed by way of a public method, and the salary member is accessed by way of a public read-only property.
Note: The private keyword is a member access modifier. Private access is the least permissive access level. Private members are accessible
only within the body of the class or the struct in which they are declared
Example:
class Employee2
{
private string name = “FirstName, LastName”;
private double salary = 100.0;
public string GetName()
{
return name;
}
public double Salary
{
get { return salary; }
}
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

You are designing a class for an application. You need to restrict the availability of the member variable accessCount to the base class and to any
classes that are derived from the base class.
Which access modifier should you use?

A

Protected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

You are creating an application that presents users with a graphical interface in which they can enter data. The application must run on computers that do not have network connectivity.
Which type of application should you choose?

A

Windows Forms

Use Windows Forms when a GUI is needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

You are creating an application that presents users with a graphical interface. Users will run this application from remote computers. Some of the remote computers do not have the . NET Framework installed. Users do not have permissions to install software.
Which type of application should you choose?

A

ASP. NET

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The elements of an array must be accessed by:

A

Using an integer index.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Simulating the final design of an application in order to ensure that the development is progressing as expected is referred to as:

A

Prototyping

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

You have a stack that contains integer values. The values are pushed onto the stack in the following order: 2,4,6,8.
The following sequence of operations is executed:
Pop -
Push 3 -
Pop -
Push 4 -
Push 6 -
Push 7 -
Pop -
Pop -
Pop -
What is the value of the top element after these operations are executed?

A

6

17
Q

What are two methods that can be used to evaluate the condition of a loop at the start of each iteration? (Each correct answer presents a
complete solution.
Choose two. )

A

C. For
D. While

18
Q

You need to evaluate the following expression:
(A>B) AND (C<D)
What is the value of this expression if A=3, B=4, C=4, and D=5?

A

D. False

19
Q

You are creating a variable for an application.
You need to store data that has the following characteristics in this variable:
✑ Consists of numbers and characters
✑ Includes numbers that have decimal points
Which data type should you use?

A

String

20
Q

You execute the following code. What will the variable result be?

A

2

21
Q

The purpose of the Catch section in an exception handler is to:

A

Execute code only when an exception is thrown.

22
Q

You execute the following code.
How many times will the word Hello be printed?

A

6

23
Q

In the life cycle of an ASP. NET Web page, which phase follows the SaveStateComplete phase?

A

Render

The SaveStateComplete event is raised after the view state and control state of the page and controls on the page are saved to the persistence
medium.
This is the last event raised before the page is rendered to the requesting browser.

24
Q

You are creating an ASP. NET Web application.
Which line of code should you use to require a control to process on the computer that hosts the application?

A

runat=”server”

25
Q

In this XHTML code sample, what will cause an error?

A

The line break tag is incorrectly formatted.

In XHTML, the <br></br> tag must be properly closed, like this: <br></br>.

26
Q
A