AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO...

16
AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN . The quiz starts TWO minutes after the tardy bell rings. You will have 30 seconds per question.

Transcript of AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO...

Page 1: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

AP Computer ScienceDYRT Quiz 17.01-06 Key

Take out a piece of paper and PEN.

The quiz starts TWO minutes after the tardy bell rings.

You will have 30 seconds per question.

Page 2: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Title the quiz as shown belowThe quiz starts in ONE minute.

Name Period Date

Quiz 17.01-06

1. 8.2. 9.3. 10.4. 11.5. 12.6. 13.7. 14.

Page 3: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 01

The fundamental building block of all computerinformation is the

(a) bit.(b) byte.(c) field.(d) record.(e) file.

Page 4: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 02

One character is stored in one or two

(a) Bit(s).(b) Byte(s).(c) Field(s).(d) Record(s).(e) File(s).

Page 5: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 03

A _____ is a sequence of records of thesame type.

(a) bit.(b) byte.(c) field.(d) record.(e) file.

Page 6: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 04

A _____ is one specific unit of information, suchas size, age, name date, etc.

(a) bit.(b) byte.(c) field.(d) record.(e) file.

Page 7: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 05

A _____ consists of a set of fields for somespecific purpose.

(a) bit.(b) byte.(c) field.(d) record.(e) file.

Page 8: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 06

What type of file only allows access in the orderthat the data is stored externally?

(a) random access files(b) internal access files(c) sequential access files(d) external access files

Page 9: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 07

What is the purpose of the File class?

(a) It transfers data for input.(b) It transfers data for output.(c) It makes a file read-only.(d) It determines various properties of a file.

Page 10: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 08

The exists method determines if a specified file is

(a) located in external storage.(b) transferred to RAM. (c) a read-only file.(d) a read/write file.

Page 11: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 09

The length method returns the number of

(a) lines in a text file.(b) bytes in a text file.(c) bits in a text file.(d) records in a text file.

Page 12: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 10

Method createNewFile

(a) transfers new file information.(b) closes existing files and creates a new file.(c) opens a file for input transfer.(d) creates a new external, empty data file.

Page 13: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 11

The BufferedWriter and FileWriter classes combineto transfer data from

(a) internal memory to external storage.(b) external storage to internal memory(c) internal memory to file buffer. (d) file buffer to internal memory.

Page 14: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 12

The BufferedReader and FileReader classescombine to transfer data from

(a) internal memory to external storage.(b) external storage to internal memory.(c) internal memory to file buffer. (d) file buffer to internal memory.

Page 15: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 13

Which method converts an int value to a Stringobject?

(a) valueOf(b) parseInt(c) xyz.dat(d) new FileWriter(“xyz.dat”)

Page 16: AP Computer Science DYRT Quiz 17.01-06 Key Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30.

Question 14

Which method converts a String value to an intvalue?

(a) valueOf(b) parseInt(c) xyz.dat(d) new FileWriter(“xyz.dat”)