Skip to main content

Computer Science I Exam Answer Key - 1124 Verified Questions

Page 1


Computer Science I

Exam Answer Key

Course Introduction

Computer Science I is an introductory course designed to provide students with a solid foundation in the fundamental concepts of computer science and programming. The course covers topics such as algorithms, problem-solving strategies, data types, control structures, functions, and basic data structures, with a primary emphasis on practical programming skills using a modern programming language such as Python, Java, or C++. Through hands-on exercises, projects, and assignments, students will learn how to write, test, and debug simple programs, while also exploring the ethical and societal impacts of computing. This course serves as a gateway for further study in computer science and related fields.

Recommended Textbook

C# Programming From Problem Analysis to Program Design 4th Edition by Barbara Doyle

Available Study Resources on Quizplus

15 Chapters

1124 Verified Questions

1124 Flashcards

Source URL: https://quizplus.com/study-set/492 Page 2

Chapter 1: Introduction to Computing and Programming

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9090

Sample Questions

Q1) Using the _________ approach,the focus is on determining the data characteristics and the methods or behaviors that operate on the data.

Answer: object-oriented

Q2) IDEs include a number of useful development tools such as SensitiveWindows,pop-up windows with completion options.

A)True

B)False

Answer: False

Q3) Which of the following would display "Good day!" on the screen?

A) WriteLine.Console("Good day!");

B) Console.WriteLine["Good day!"];

C) WriteLine.Console{"Good day!"};

D) Console.WriteLine("Good day!");

Answer: D

Q4) C# is considered native code. A)True

B)False

Answer: False

To view all questions and flashcards with answers, click on the resource link above.

3

Chapter 2: Data Types and Expressions

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9091

Sample Questions

Q1) In order to place a value in memory that cannot be changed,you add the keyword ____________ to the declaration.

Answer: const

Q2) The result of the following expression is ____. double ans,v1 = 45.7,v2 = 10.5; Int v3 = 5; Ans = (int)v1 + v2 / (double)v3;

A) 48.8

B) 47.1

C) 48

D) 47

Answer: B

Q3) The number 11111111 in binary is equivalent to the number 255 in decimal. A)True B)False

Answer: True

Q4) A(n)____________ represents an area in the computer memory where a value of a particular data type can be stored.When you declare a(n)____________,you allocate memory for that data item in your program. Answer: variable

To view all questions and flashcards with answers, click on the resource link above. Page 4

Chapter 3: Methods and Behaviors

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9092

Sample Questions

Q1) The return type for the method above is ____.

A) public

B) static

C) void

D) Main( )

Answer: C

Q2) Console applications require a Main( )method,unlike Windows applications that do not require a Main( )method.

A)True

B)False

Answer: False

Q3) The Read( )method ____.

A) is a nonvalue-returning method

B) returns a string

C) returns a single char

D) returns an int

Answer: D

Q4) ____________ is used to indicate that no value is being returned from a method.

Answer: void

To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: Creating Your Own Classes

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9093

Sample Questions

Q1) By abstracting out the attributes (data)and the behaviors (processes on the data),you can create a(n)____________ to serve as a template from which many objects of that type can be instantiated.

Q2) When you define a class method,you define its characteristics or fields in terms of the data.

A)True

B)False

Q3) If you overwrite the ToString( )method,you should also override the other methods of the object class.

A)True

B)False

Q4) Instance methods manipulate data by ____.

A) directly accessing private data members.

B) passing information as arguments through parameters.

C) using constructors and accessors.

D) sending visible data in the Main( ) method.

Q5) The body of the constructor methods consist primarily of ____________.

Q6) Data members should be defined with an access mode of ____________.

Q7) ____________ access modifier is always associated with constructors.

Q8) Accessor and mutators are ____________ methods

To view all questions and flashcards with answers, click on the resource link above. Page 6

Chapter 5: Making Decisions

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9094

Sample Questions

Q1) String operands can be compared using the relational symbols.They are compared lexicographically using their Unicode character representation.

A)True

B)False

Q2) The ____________ method will convert a string value sent as an argument to its equivalent numeric value,but it doesn't throw an exception when the conversion fails.

Q3) The result of the expression above is ____.

A) true or false

B) true

C) numeric

D) 100

Q4) How can the compound conditional expression ((average > 79 && average <= 89))be written to eliminate the logical operator - without changing the logic?

A) remove the && and create a nested if statement

B) (average > 79 <= 89)

C) by replacing the && with ||

D) (79 > average <= 89)

Q5) The switch statement also goes by the name ____________.

To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: Repeating Instructions

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9095

Sample Questions

Q1) The for statement is a compact method of writing the loops that can be written using while;it packages together the ____________,test,and update all on one line.

Q2) The last value printed with the above program segment is ____.

A) 0

B) 1

C) 99

D) 100

Q3) How many lines will be printed for the above nested loop?

A) 2

B) 3

C) 5

D) 6

Q4) C# performs automatic garbage collection once the loop is finished and releases any variables declared as part of the loop.

A)True

B)False

Q5) ____________ loops are often used for inputting data when you do not know the exact number of values to be entered.

Q6) The third programming construct repetition is also called ____________.

Page 8

To view all questions and flashcards with answers, click on the resource link above.

Chapter 7: Arrays

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9096

Sample Questions

Q1) An entire array collection of data can be ordered alphabetically with a call to the Array class member method ____________.

Q2) When two or more arrays have a relationship such that you are able to use the same subscript or index to refer to related elements in the arrays,you have ____ arrays. A) parallel B) two dimensional C) dynamic

D) related

Q3) Given an array declared to hold 100 values,the smallest index that can be used with the array is ____.

A) based on what index is used when the first value is placed in the array B) 1

C) 0

D) undetermined

Q4) The first element of an array is always referenced by index ____________.

Q5) Elements in an array are sometimes referred to as ____________ variables.

Q6) The type used in the foreach expression must match the array type.

A)True

B)False

9

To view all questions and flashcards with answers, click on the resource link above.

Chapter 8: Advanced Collections

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9097

Sample Questions

Q1) ____________ class represents a simple last-in-first-out (LIFO)collection of objects.

Q2) The string class stores an immutable series of characters--meaning once you assign a string reference a value,that referenced location's value cannot be modified.

A)True

B)False

Q3) A two dimensional array is accessed much like you access cells in a spreadsheet.

A)True

B)False

Q4) One of the properties of the ArrayList class is ____. It Gets or sets the number of elements that the ArrayList can contain.

A) Length

B) Capacity

C) Rank

D) Count

Q5) To declare a three-dimensional array,three integral values are used.The first number specifies the number of ____________.

Q6) Like traditional arrays,indexes of ArrayList objects are ____________.

To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Introduction to Windows Programming

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9098

Sample Questions

Q1) Using the tools available from the FORMAT menu can greatly reduce your development time.All of the following are menu options EXCEPT ____.

A) Make Same Size

B) Align

C) Horizontal Spacing

D) Attach to Process

Q2) When you create a new Windows application using Visual Studio,if you do not see the constructed form,but instead see the program statements,you have selected the wrong template and need to begin again.

A)True

B)False

Q3) The ____ property is used to determine whether a control is the one currently selected.

A) Control

B) Focused

C) Enabled

D) Visible

Q4) ____________ objects are normally used to provide descriptive text for another control.

To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Programming Based on Events

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/9099

Sample Questions

Q1) You can assign a(n)____________ to controls,such as text boxes or menu items,so that text is displayed when the cursor is rested on top of the component.

Q2) Double-clicking on the ListBox control registers which default event?

A) SelectedIndexChanged

B) Click event

C) DoubleClick

D) ItemChanged

Q3) When you define a delegate type,you identify what types of methods the delegate represents.

A)True

B)False

Q4) Which property is used with the PictureBox control to associate an actual picture to the control?

A) Resource

B) Image

C) Icon

D) Picture

Q5) The ____________ property can be set for RadioButton controls to indicate which button is initially selected.

To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: Advanced Object-Oriented Programming

Features

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9100

Sample Questions

Q1) Constructors,which use the same identifier as their class,are normally defined with protected access.

A)True

B)False

Q2) The Global Assembly Cache (GAC)stores assemblies designated to be shared by several applications.

A)True

B)False

Q3) ILDASM,which must be run from the command line,is a tool used to view an assembly.

A)True

B)False

Q4) Components that can be referenced from any number of applications are created as class library files with a dynamic link library (DLL)extension.

A)True

B)False

Q5) With C#,you have single inheritance,but a class can ____________ multiple interfaces.

Q6) Classes that inherit from a base class are called ____________ classes.

To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: Debugging and Handling Exceptions

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9101

Sample Questions

Q1) Writing the catch clause without an argument list is the same as writing

Q2) An attempt to access an element of an array with an index that is outside the bounds of the array throws a ____.

A) System.IndexOutOfRangeException

B) System.ArrayTypeMismatchException

C) System.IndexOutOfBoundsException

D) System.InvalidIndexException

Q3) Markers placed in an application to indicate the program should halt execution when it reaches that spot is a ____.

A) breakpoint

B) break mode

C) debug point

D) debugger spot

Q4) If the current method does not contain an exception handler,that method is halted,and the parent method that called the method that threw the exception attempts to handle the exception.The exception is said to be ____________ to the calling method.

Q5) C# adheres to a fairly sophisticated set of rules known as C# ____________.

To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 13: Working with Files

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9102

Sample Questions

Q1) The File,FileInfo,Directory,and DirectoryInfo classes are considered utility classes.They normally work with stream objects,allowing you to manipulate files and directory structures.

A)True

B)False

Q2) Instead of hard coding the actual filename and file path,you could prompt the user for the name of the file using subclasses of the FileDialog class.

A)True

B)False

Q3) To invoke File's Copy( )method to make a copy of "source.txt",naming the new file "target.txt",you would write: File.Copy("source.txt","target.txt");because Copy is a static member of the File class.

A)True

B)False

Q4) Using the above segment of code,inValue would be defined as what type of data?

A) StreamReader

B) int

C) text

D) string

To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Working with Databases

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9103

Sample Questions

Q1) The SELECT statement can also be used to retrieve results from multiple tables by joining them using a common field.

A)True

B)False

Q2) Typically when you are programming for database access,you use a(n)____________.

Q3) You may not want to make a local copy of the database if ____.

A) updates or changes are being made to the database

B) it is a SQL Server database

C) this is the first time the database is accessed

D) you are not the database administrator

Q4) The connection string includes ____.

A) the data provider and the database name

B) SQL statement to retrieve the data

C) the type of database

D) an open statement

Q5) A Data Source Configuration Wizard is available in Visual Studio to automatically generate the connection string,create dataset and table adapter objects,and bring the data into an application.

A)True B)False

To view all questions and flashcards with answers, click on the resource link above. Page 16

Chapter 15: Web-Based Applications

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/9104

Sample Questions

Q1) Using Visual Studio,you can add which of the following types of controls?

A) Navigation

B) Login

C) Data

D) All of the above

Q2) Software that hosts or delivers a Web application is called a(n)____.

A) Web server

B) Internet browser

C) Integrated Development Environment (IDE)

D) Web site

Q3) When you set the Web Forms control's property using the Properties window in Visual Studio,the settings are stored in the code behind file-the file ending with the .aspx.cs extension.

A)True

B)False

Q4) The code-behind file with ASP.NET is saved using which file extension?

A)xaml

B)xaml.cs

C) .aspx

D)aspx.cs

Page 17

To view all questions and flashcards with answers, click on the resource link above.

Turn static files into dynamic content formats.

Create a flipbook
Computer Science I Exam Answer Key - 1124 Verified Questions by Quizplus - Issuu