Introduction To Programming FINAL

25 July 2022
4.7 (114 reviews)
30 test answers

Unlock all answers in this set

Unlock answers (26)
question
d. close
answer
When you ____ a file, it is no longer available to your application. Answers: a. rewrite b. examine c. index d. close
question
When you copy data from RAM into a file on a storage device, you read to the file. Answers: True False
answer
False
question
When you copy data from a file on a storage device into RAM, you are ____ from the file. Answers: a. uploading b. writing c. outputing d. reading
answer
d. reading
question
Declaring a class does not create actual objects. Answer: True False
answer
True
question
____ are groups of fields that go together for some logical reason. Answers: a. Columns b. Databases c. Records d. Tables
answer
c. Records
question
When you think in an object-oriented manner, every object is a member of a more general ____. Answers: a. struct b. class c. method d. collection
answer
b. class
question
The keyboard and printer are the default input and output devices. Answers: True False
answer
False
question
List five important features of object-oriented languages.
answer
Five important features of object-oriented languages are: • Classes • Objects • Polymorphism • Inheritance • Encapsulation
question
Object-oriented programmers sometimes say an object is one ____ of a class. Selected Answer: Answers: a. instantiation b. reference c. enumeration d. member
answer
a. instantiation
question
In most programming languages, before an application can use a data file, it must ____. Answers: a. close the file b. open the file c. prepare the file d. read the file
answer
b. open the file
question
Methods in object-oriented programs use sequence, selection, and looping structures and make use of arrays. Answers True False
answer
True
question
List and describe three characteristics that all files have in common.
answer
Each file has a name. The name often includes a dot and a filename extension, which is a group of characters added to the end of a filename that describes the type of file. For example, .txt is a plain text file, .dat is a data file, and .jpg is an image file in Joint Photographic Experts Group format. A filename's extension frequently designates the software that will be used to open a file; for example, a file that uses the extension .docx will usually be opened by Microsoft Word by default. ​ Each file has a specific time of creation and a time it was last modified. ​ Each file occupies space on a section of a storage device; that is, each file has a size. Sizes are measured in bytes.
question
The terms "parent" and "child" can refer to file backup generations, but they are also used for a different purpose in object-oriented programming. Answers: True False
answer
True
question
The process of combining all of an object's attributes and methods into a single package is ____. Answers: a. data hiding b. encapsulation c. information hiding d. inheritance
answer
b. encapsulation
question
A file can be open using 3 different modes. Explain each of them and their behavior when the file being open already exist and when athe file being open does not exist.
answer
Read, Write, and Append.
question
Because they enable you to locate a particular record directly (without reading all of the preceding records), random access files are also called ____ files. Answers: a. pointed access b. indirect access c. sequential access d. direct access
answer
d. direct access
question
A ____ is a copy that is kept in case values need to be restored to their original state. Answers: a. read-only file b. secondary file c. primary file d. backup file
answer
d. backup file
question
Objects both in the real world and in object-oriented programming contain ____ and methods. Answers: a. primitive data types b. help c. attributes d. behaviors
answer
c. attributes
question
Files exist on ____ storage devices, such as hard disks, DVDs, USB drives, and reels of magnetic tape. Answers: a. optical b. scalable c. transient d. permanent
answer
d. permanent
question
Files in which records must be accessed immediately are sometimes called instant access files. Answers: True False
answer
True
question
Within any object-oriented program, you continuously make requests to an object's methods, often including arguments as part of those requests. Answers: True False
answer
True
question
A(n) ____ consists of a rectangle divided into three sections. Answers: a. class tree b. dependency diagram c. class diagram d. entity-relationship diagram
answer
c. class diagram
question
Directories and ____ are organization units on storage devices. Answers: a. folders b. streams c. files d. partitions
answer
a. folders
question
Images and music are contained in binary files. Answers: True False
answer
True
question
List the three parts of a class definition.
answer
A class definition can contain three parts: • Every class has a name. • Most classes contain data, although this is not required. • Most classes contain methods, although this is not required.
question
In addition to their attributes, classes have methods associated with them, and every object instantiated from a given class possesses different methods. Answers: True False
answer
False
question
A ____ is a set of program statements that lists the characteristics of each object and the methods each object can use. Answers: a. class model b. class interface c. class reference d. class definition
answer
d. class definition
question
A ____ is a collection of data stored on a nonvolatile device in a computer system. Answers: a. computer message b. computer interface c. computer selector d. computer file
answer
d. computer file
question
How are the keyboard and monitor used in most programming languages?
answer
Most programming languages allow you to read data from a keyboard or write it to the display monitor without having to issue open or close commands because the keyboard and monitor are the default input and output devices, respectively.
question
Class diagrams consists of a rectangle divided into three sections. Answers: True False
answer
True