All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
prelude to programming
Questions and Answers of
Prelude to Programming
To access the fifth record in a(n) ____________ file, we don’t need to read the first four records first.
Write a subprogram called EnterButton.Click() that adds the number in a text box named NumberBox to a variable, Sum, and then clears the text box.
Write a subprogram called Option1.Click() that places a bullet in an option button named Option1 and removes the bullet from an option button named Option2.
Write a subprogram called OKbutton.Click() that opens a window named Window1 or a window named Window2, depending on whether option buttons named Option1 or Option2, respectively, contain a bullet.
Write a subprogram called Abutton.Click() that sets the text in a text box named Text1 equal to "Hello" and grays out a command button named Bbutton.
List three properties common to command buttons, option buttons, and text boxes.
List three properties of a window.
In the window shown in Figure 11.23 which option button is selected? Exercise Window The messge is: Hello Time r Both G Date OK Cancel
For the window shown in Figure 11.23 give the captions or labels for each of the following:a. Text box(es)b. Label object(s) Exercise Window The messge is: Hello Time r Both G Date OK Cancel
Write the statement that would be used in the main program to display the area of MyRectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End
Write the statement that would be used in the main program to compute the area of MyRectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End
Write the statement that would be used in the main program to set the length of the side of MyRectangle equal to 15 and the height equal to 25. Class Square Declare Protected Side, Area As Float
Create an instance of the class, Rectangle and reference it with the name MyRectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End
List all methods of an object in the class Rectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor Public Subprogram SetSide
List all attributes of an object in the class Rectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor Public Subprogram SetSide
Write the statement that would be used in the main program to display the area of MySquare. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End
Write the statement that would be used in the main program to compute the area of MySquare. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End
Write the statement that would be used in the main program to set the length of the side of MySquare equal to 20. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3!
Create an instance of the class Square and reference it with the name MySquare. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor
Suppose Rectangle1 is an object of the class Rectangle and the statementCall Rectangle1.ComputeArea()appears in the main program. Which formula for area is used in the execution of the subprogram
Suppose Square1 is an object of the class Square and the statementCall Square1.ComputeArea()appears in the main program. Which formula for area is used in the execution of the subprogram
Give the names of the methods of the class Square. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor Public Subprogram SetSide
List the attributes of the class Square. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor Public Subprogram SetSide (NewSide) Set
The programming language supplies the code for the action that takes place when the user clicks a command button.True of False
From a programming point of view, clicking a command button is considered an event.True of False
All window components have the same attributes.True of False
The attributes of objects that make up a GUI are also called properties.True of False
In designing an object-oriented program, the emphasis is placed on the procedures, rather than on the objects, needed to solve a given problem.True of False
When contrasted to OOP, the approach to programming that uses top-down, modular program design is called procedural programming.True of False
Methods are also known as subprograms, procedures, or functions.True of False
Attributes are also known as subprograms, procedures, or functions.True of False
The methods of an object are the operations that can be performed on that object’s data.True of False
One attribute of a command button object is its name.True of False
The GUI object most commonly used to allow the user to initiate an action is a _______ button.
The GUI object most commonly used to select a single option is a(n) __________.
The industry standard for system modeling is _____.
The _____ initializes an object’s attributes and establishes the conditions that do not change in the class.
Write a program that displays the names of students in a certain class, one by one, and allows the user to enter a test score for the student displayed. The students’ names and scores are contained
When a subclass is created based on an existing class, the original class is called the _____ or _____ and the new class is called the _____ or _____.
Using the window shown in Figure 11.24, write a temperature conversion program. To use this program, the user selects an option, types a temperature into the appropriate text box, and clicks the
The property of OOP that allows variations of a method to be applied to objects of different classes is called _____.
Everyone at OOPU gets assigned a college email account. The account is created using a simple formula. The email username is simply the person’s first name and last name, separated by a dot. Then
The property of OOP that allows the creation of new classes based on existing ones is called _____.
Rewrite the two classes in the Parking Lot program of Section 11.2 to include an email attribute (Email) and its associated access methods (SetEmail() and GetEmail()). The Email attribute and access
The property of OOP that refers to the incorporation of data and operations into a single unit is called _____.
Write a program that displays the income tax due in the state of Euphoria on a taxable income (in whole dollars) entered by the user, according to the tax table shown in Table 11.1.The program should
A(n) _____ is an instance of a class.
Write a program that inputs (from the user) the number of hours worked and hourly pay rate for employees and outputs their total pay. The program should process an arbitrary number of employees; the
A(n) _____ is a data type that is made up of attributes and methods.
What is the output of code corresponding to the following pseudocode?Suppose that the file "data" consists of the following records:"Huey",1,2"Dewey",4,5"Louie",7,8 Declare Ducks[10] As String
Write a program segment that displays the contents of the arrays of Exercise 36 on 25 lines, each containing three test scores.Assume that a file named "test" has 25 records of the following
Write a program segment that loads the "test" file into the arrays.Assume that a file named "test" has 25 records of the following form:score_1 (Integer), score_2 (Integer), score_3 (Integer)Suppose
Write a statement that declares these three arrays.Assume that a file named "test" has 25 records of the following form:score_1 (Integer), score_2 (Integer), score_3 (Integer)Suppose we want to load
If FileOne and FileTwo had been given in reverse alphabetical order and the pseudocode were changed as in Short Answer 33, what would be the contents of Merged after the While loop is exited?Refer to
If FileOne and FileTwo had been given in reverse alphabetical order, what changes would have to be made to this pseudocode to merge these files into a file that is in reverse alphabetical order?Refer
Which names are added to the end of the file Merged to complete the merging of the two files?Refer to the following pseudocode, which partially merges the files with internal names FileOne and
When the While loop is exited, what are the contents of the file Merged?Refer to the following pseudocode, which partially merges the files with internal names FileOne and FileTwo into a third file
How many passes are made through the While loop?Refer to the following pseudocode, which partially merges the files with internal names FileOne and FileTwo into a third file named Merged. (Each
After the first pass through the While loop, what are the contents of the file Merged?Refer to the following pseudocode, which partially merges the files with internal names FileOne and FileTwo into
In the program segment of Exercise 23:a. Give two possible data types for the variable Item.b. Give two possible data types for the variable Number.Data from Exercise 23Read GivenFile, Item,
Give the contents of the file named "update" after each program segment is executed. Assume that the content of the file named "original" at the beginning of each program segment
Give the contents of the file named "update" after each program segment is executed. Assume that the content of the file named "original" at the beginning of each program segment
Give the contents of the file named "update" after each program segment is executed. Assume that the content of the file named "original" at the beginning of each program segment
Give the contents of the file named "update" after each program segment is executed. Assume that the content of the file named "original" at the beginning of each program segment
Give the contents of the file named "update" after each program segment is executed. Assume that the content of the file named "original" at the beginning of each program segment
Write a program that will display the contents of the sequential file of Exercise 21 on the user’s screen.Data from Exercise 21Write a program, by inputting names from the user, that will create a
Write a program, by inputting names from the user, that will create a sequential file with the contents"Arthur""Michael""Sam".
To merge two sequential files, they must first be opened for Output.True of False
After merging two sequential files that are sorted in ascending order, the resulting merged file will also be sorted in ascending order.True of False
Some programming languages contain statements that can be used to append records to data files.True of False
If a single record is to be changed in a sequential file, then the entire file must be rewritten to a temporary file.True of False
When a file is closed, the connection between the internal and external names is terminated.True of False
When a file is opened for Input, data can be written from the program to that file.True of False
The statementWrite DataFile, Numbertransmits the value of Number to the file with internal name DataFileTrue of False
If a file is opened for Output, and a file of that name already exists in that folder, then all data on the latter file is erased.True of False
Word processors are designed to be able to read all binary files.True of False
A data file can store a program’s output for future use.True of False
A data file can be used by more than one program.True of False
A program file contains data that is to be used by various programs.True of False
The “specified variable” of Exercise 7 is called the ____________ variable for the process.Data from Exercise 7In the technique of ____________, the program exits a loop or module and performs an
In the technique of ____________, the program exits a loop or module and performs an action whenever the value of a specified variable changes or reaches a predetermined level.
To access the fifth record in a(n) ____________ file, we must read the first four records first.
The Department of Motor Vehicles in the state of Euphoria has finally decided to computerize its list of licensed drivers. The program you write should make use of an existing file named "licenses"
A(n) ____________ file may contain nonstandard characters.
The Eversoft Eraser Company has a list of its customers’ names (not necessarily in alphabetical order) and telephone numbers in a file named "customer" with records of the following form:last_name
A(n) ____________ file consists solely of standard characters.
a. The Last National Bank has two branches, each of which uses a sequential file containing a summary of customers’ checking accounts in the following form:account_number(Integer),
Data files are often made up of records, which consist of one or more items called ____________.
Assume that a file named "inventory", which contains the inventory of parts for the Legendary Lawn Mower Company (from Section 10.5), already exists with records of the following form:part_Number
A(n) ____________ is a collection of data that has been given a name and stored in a file.
a. Input names and three test scores of students from the user, terminated by "ZZZ",0,0,0, and create a data file "grades" with records of the following form:student_name (String), test_1 (Integer),
Suppose a program contains the following function:Function G(X,Y) As Float Set G = X + YEnd FunctionWhat is displayed when the statementWrite G(4,5) in the main program is executed?
A(n) ____________ is a type of subprogram whose name may be assigned a value.
Use functions and submodules as appropriate to allow a user to create an interesting display of text. The user should enter a string of text and a character or characters to use as a border. The main
The part of the program in which a given variable can be referenced is called the ____________ of that variable.
The scope of a(n) ____________ variable is the entire program.
A(n) ____________ function is one that is supplied by the programming language; its code does not appear in the program that uses it.
When a subprogram calls itself, the process is called ____________.
If N = 2 and Sum(N) is a function with Sum(1) = 5, then the statement Set Sum = Sum(N − 1) + N assigns the value _____________ to Sum.
Changes to a value parameter in a subprogram affect the corresponding argument in the calling module.True of False
Showing 1 - 100
of 587
1
2
3
4
5
6