Introduction to programming FINAL

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

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

False

The keyboard and printer are the default input and output devices. Answers: True False

False

When you copy data from RAM into a file on a storage device, you read to the file. Answers: True False

False

List five important features of object-oriented languages.

Five important features of object-oriented languages are: • Classes • Objects • Polymorphism • Inheritance • Encapsulation

How are the keyboard and monitor used in most programming languages?

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.

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.

Read, Write, and Append.

Directories and ____ are organization units on storage devices. Answers: a. folders b. streams c. files d. partitions

a. folders

____ are groups of fields that go together for some logical reason. Answers: a. Columns b. Databases c. Records d. Tables

c. Records

Images and music are contained in binary files. Answers: True False

True

d. close

When you ____ a file, it is no longer available to your application. Answers: a. rewrite b. examine c. index d. close

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

b. class

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

d. backup file

List the three parts of a class definition.

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.

List and describe three characteristics that all files have in common.

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.

Class diagrams consists of a rectangle divided into three sections. Answers: True False

True

Declaring a class does not create actual objects. Answer: True False

True

Files in which records must be accessed immediately are sometimes called instant access files. Answers: True False

True

Methods in object-oriented programs use sequence, selection, and looping structures and make use of arrays. Answers True False

True

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

True

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

True

Object-oriented programmers sometimes say an object is one ____ of a class. Selected Answer: Answers: a. instantiation b. reference c. enumeration d. member

a. instantiation

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

b. encapsulation

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

b. open the file

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

c. attributes

A(n) ____ consists of a rectangle divided into three sections. Answers: a. class tree b. dependency diagram c. class diagram d. entity-relationship diagram

c. class diagram

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

d. class definition

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

d. computer file

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

d. direct access

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

d. permanent

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

d. reading


Set pelajaran terkait

CNF Exam 2: Oxygenation and Perfusion (38)

View Set

Personal and community health test 1

View Set

ECON 1110 Reading Check Chpt 6-7

View Set

B-8 Broker Practices & Disclosure Ch.17 - Self Study & Quiz

View Set