Filters
Question type

Study Flashcards

Case 1 - Frames Unlimited Frames Unlimited is a wholesale picture and poster frame business. Frame data is stored in sequential access files that contain four columns: item number, item name, size, and price. -An application uses the posterFrame.txt sequential access file to display all of the poster frames in a list box.You need to use the list box to select and remove any poster frames that are 16x20.Which of the following statements determines if a line is selected in the list box?


A) if lstPosters.SelectedIndex <> -1 Then
B) if lstPosters.Selected <> -1 Then
C) if lstPosters.SelectedIndex = -1 Then
D) if lstPosters.Selected = -1 Then

Correct Answer

verifed

verified

Write the statement that would remove the item "RGT12985" from the lstPartNumber control.

Correct Answer

verifed

verified

lstPartNum...

View Answer

Write an If clause that determines whether the sequential access file named contacts.txt exists.If the file exists,open the file.If the file does not exist,display the message "File not found" in a message box.The application is named "View Contacts".

Correct Answer

verifed

verified

If IO.File.Exists("contacts.tx...

View Answer

You should use the ____ method to close a sequential access file as soon as you are finished using it.


A) Exit
B) Close
C) End
D) Quit

Correct Answer

verifed

verified

You cannot include an array in a structure.

Correct Answer

verifed

verified

Case 1 - Frames Unlimited Frames Unlimited is a wholesale picture and poster frame business. Frame data is stored in sequential access files that contain four columns: item number, item name, size, and price. -You should ____ the pictureFrame.txt file as soon as you have finished using it.


A) Save
B) Read
C) Close
D) Peek

Correct Answer

verifed

verified

In Visual Basic,you use a(n) ____ to write a stream of characters to a sequential access file.


A) CreateText method
B) StreamReader object
C) StreamWriter object
D) AppendText method

Correct Answer

verifed

verified

Write the code to declare a variable named outFile that can be used to write data to a sequential access file.Then write the statement to open a sequential access file named customers.txt for output.

Correct Answer

verifed

verified

Dim outFile As IO.St...

View Answer

What is the difference between an input file and an output file?

Correct Answer

verifed

verified

Files that are read by the computer are ...

View Answer

You reserve memory locations by declaring a structure variable.

Correct Answer

verifed

verified

Which of the following statements can be used to fill a string variable with asterisks resulting in "*****$675.89"?


A) amount=amount.Fill(12,"*")
B) amount=amount.Insert(5,"*")
C) amount=amount.PadLeft(12,"*")
D) amount=amount.Space(5, "*")

Correct Answer

verifed

verified

In Visual Basic,you use a(n) ____ to read data from a sequential access file.


A) StreamWriter object
B) OpenText method
C) ReadLine method
D) StreamReader object

Correct Answer

verifed

verified

Which of the following statements will read data from a sequential access file?


A) inFile.Read
B) inFile.Peek
C) inFile.ReadWrite
D) inFile.ReadLine

Correct Answer

verifed

verified

Write a Structure statement that defines a structure named Order.The structure contains four member variables named strItemNum,strItemDesc,decPrice,and intQuantity.Then write the Dim statement that declares an Order variable named furniture.

Correct Answer

verifed

verified

Structure Order
Public strItem...

View Answer

You use the ____ member access operator to separate the structure variable's name from the member variable's name.


A) ()
B) arrow
C) asterisk
D) dot

Correct Answer

verifed

verified

Which of the following opens the employee.txt file for output,creates a StreamWriter object,and assigns it to the outFile variable?


A) outFile = File.CreateText("F:\employee.txt")
B) outFile = IO.File.CreateText("F:\employee.txt")
C) outFile = File.CreateText("F:\")
D) outFile = IO.File.Create("F:\employee.txt")

Correct Answer

verifed

verified

Which of the following removes the sixth item from the lstTrees control?


A) lstTrees.Items.Remove(5)
B) lstTrees.Items.Remove(6)
C) lstTrees.Items.RemoveAt(5)
D) lstTrees.Items.RemoveAt(6)

Correct Answer

verifed

verified

Write the statement that would remove the selected item from the lstFlowers control if an item is selected.

Correct Answer

verifed

verified

If lstFlowers.Select...

View Answer

An application contains the Structure statement shown below: Structure SalonInfo Public strService As String Public intRate As integer End Structure Write a Dim statement that declares an eight-element one-dimensional array of SalonInfo variables.Name the array mySalonInfo.Write the code to store the following data in the array:  haircut 50 haircol or 85 blowdry 35 facial 65\begin{array} { | l | l | } \hline \text { haircut } & 50 \\\hline \text { haircol or } & 85 \\\hline \text { blowdry } & 35 \\\hline \text { facial } & 65 \\\hline\end{array}

Correct Answer

verifed

verified

Dim mySalonInfo(3)As SalonInfo
mySalonIn...

View Answer

In addition to getting data from the keyboard and sending data to the computer screen,an application can also get data from and send data to a file on a disk.

Correct Answer

verifed

verified

Showing 41 - 60 of 60

Related Exams

Show Answer