Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 10, Problem 10RQ
Program Description Answer
The statement used to create an instance of an Inventory object and assign that object to the chair variable is Dim chair As New Inventory.
Hence, the correct answer is option “B”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
3.
Which among the following shows a valid use of the Direction enumeration as a parameter to the moveCharacter function? Select al that apply.
enum Direction { case north, south, west, east}func moveCharacter(x: Int, y: Int, facing: Direction) {// code here}
moveCharacter(x: 0, y: 0, facing: .southwest)
moveCharacter(x: 0, y: 0, facing: Direction.north)
moveCharacter(x: 0, y: 0, facing: .south)
moveCharacter(x: 0, y: 0, facing: Direction.northeast)
The above screen is used to browse the products table it uses the ProductDAO.java file, it calls the getProductByCriteria() function which should accept a parameter, this parameter should be the criteria that would be built from the two combo boxes and the text box, and queries the products table.The getProductByCriteria() function should return a list of Product objects that matches the criteria specified.
Modify the function so that it accepts a string paramater consisting of the fields from the combo boxes and a price number from the text box separated by commas and use this string to modify the query in the function to return the desired result set.
public List<Product> getProductByCriteria() //MAKE MODIFICATIONS TO THIS FUNCTION SO IT CAN TAKE PARAMETER(S)
{
if (openConnection())
{
try{
List<Product> items = new ArrayList <> ();
Product temp = null;
String…
Which of the following instantiates an Inventory object and assigns it to the chair variable? a. Dim chair As Inventory b. Dim chair As New Inventory c. Dim chair = New Inventory d. Dim New chair As Inventory
Chapter 10 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 10 - The name of a class file ends with which of the...Ch. 10 - The Inventory class contains a Private variable...Ch. 10 - Prob. 4RQCh. 10 - Which of the following statements is false? a. A...Ch. 10 - A Private variable in a class can be accessed...Ch. 10 - Prob. 7RQCh. 10 - Which of the following is the name of the...Ch. 10 - Prob. 10RQCh. 10 - Prob. 11RQCh. 10 - Prob. 12RQ
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Which of the following is the name of the Inventory class’s default constructor? Inventory InventoryConstructor Default Newarrow_forwardIn this exercise, you modify the Grade Calculator application from this chapter’s Apply lesson. Use Windows to make a copy of the Grade Solution folder. Rename the copy Grade Solution-Intermediate. Open the Grade Solution.sln file contained in the Grade Solution-Intermediate folder. Open the CourseGrade.vb file. The DetermineGrade method should accept an integer that represents the total number of points that can be earned in the course. (Currently, the total number of points is 200: 100 points per test.) For an A grade, the student must earn at least 90% of the total points. For a B, C, and D grade, the student must earn at least 80%, 70%, and 60%, respectively. If the student earns less than 60% of the total points, the grade is F. Make the appropriate modifications to the DetermineGrade method and then save the solution. Unlock the controls on the form. Add a label control and a text box to the form. Change the label control’s Text property to “&Maximum points:” (without the quotation marks). Change the text box’s name to txtMax. Lock the controls and then reset the tab order. Open the form’s Code Editor window. The txtMax control should accept only numbers and the Backspace key. Code the appropriate procedure. The grade should be cleared when the user makes a change to the contents of the txtMax control. Code the appropriate procedure. Modify the frmMain_Load procedure so that each list box displays numbers from 0 through 200. Locate the btnDisplay_Click procedure. If the txtMax control does not contain a value, display an appropriate message. The maximum number allowed in the txtMax control should be 400; if the control contains a number that is more than 400, display an appropriate message. The statement that calculates the grade should pass the maximum number of points to the studentGrade object’s DetermineGrade method. Make the necessary modifications to the procedure. Save the solution and then start and test the application.arrow_forwardWhich of the following statements is false? a. A class can contain only one constructor. b. An example of a behavior is the SetTime method in a Time class. c. An object created from a class is referred to as an instance of the class. d. An instance of a class is considered an object.arrow_forward
- A computer store uses a database to track inventory. The database has a table named Inventory , with the following columns: ProductID INTEGER PRIMARY KEY NOT NULL ProductName TEXT QtyOnHand INTEGER Cost REAL Also assume that the cur variable references a Cursor object for the database. Write Python code that does the following: Executes a SELECT statement to return all the columns from the rows where ProductName contains the string "Laptop" with any characters before or after it. Assigns all the results of the SELECT statement to a variable named results .arrow_forwardA computer store uses a database to track inventory. The database has a table named Inventory, with the following columns: ProductID INTEGER PRIMARY KEY NOT NULL ProductName TEXT QtyOnHand INTEGER Cost REAL Also assume that the cur variable references a Cursor object for the database. Write Python code that does the following: Executes a SELECT statement to return all the columns from the rows where Cost is less than 999.99. Assigns all the results of the SELECT statement to a variable named results.arrow_forwardCustomer c1 = new Customer("user", "pass"); c1.setPassword("changeme"); Customer c1 = new Customer("user","pass"); c1.password("changeme"); Customer c1 = new Customer("user", "pass"); c1.password = c1.setPassword("changeme"); Customer c1 = new Customer("user","pass"); c1.password = "changeme";arrow_forward
- In the following procedure, the parameter age represents a person's age. The procedure is intended to return the name of the age group associated with age. People who are under 18 are considered minors, people who are 65 and older are considered senior citizens, and all other people are considered adults. The procedure does not work as intended. Line 1: PROCEDURE ageGroup(age) Line 2: } result "adult" Line 3: Line 4: IF(age 65) Line 5: { Line 6: result "senior citizen" Line 7: Line 8: RETURN(result) Line 9: Line 10: result "adult" Line 11: IF(age < 18) Line 12: Line 13: result "minor" Line 14: Line 15: RETURN(result) Line 16: } ill cause the procedure to work as intended?arrow_forwardCompare userNumber with compareNumber and display 'Numbers are not equal' if the numbers are different. Then, display 'Variables are not identical' if the variables are not identical (not strictly equal). let compareNumber = 3; // Code will be tested with: 3, 8, 42let userNumber = '3'; // Code will be tested with: '3', 8, 'Hi'arrow_forwardIn the following pseudocode of creating a trigger, the first UPDATE is the ____ of the trigger, and the second UPDATE is the ____ of the trigger. CREATE TRIGGER MyTrigger AFTER UPDATE OF attr ON MyTable ... WHEN ... UPDATE MyTable .... Group of answer choices Action; action Condition; action Event; action Event; conditionarrow_forward
- You will be writing a scheduling application allowing a convention center to schedule events. This program will contain two different classes: Date and Event. Both classes should be defined on their own .py modules. You may use the Date class we designed in class in lecture 18 (which will also be posted on Canvas). The Event class should have the following attributes: event_date (which should be a Date object) event_name start_hour: Uses a 24-hour clock, so should be a value between 0 and 23 endHour: Uses a 24-hour clock, so should be a value between 0 and 23 The Event class should have the following methods: __str__. Return a string representation of all important info about this Event: The name of the event, the start and end times (you can simply print their value i.e. from 14 to 16) and the Date. Properties and setters for the attributes. A constructor which takes a name, start and end hours, and a Date object. Note: For sake of simplicity, each event will only take one day…arrow_forwardPendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author’s name, the title of the work, and a volume number in the form Volume 9 of 9. For example, a set of three volumes requires three labels: Volume 1 of 3, Volume 2 of 3, and Volume 3 of 3. Design an application that reads records that contain an author’s name, the title of the work, and the number of volumes. The application must read the records until eof is encountered and produce enough labels for each work. The flowchart must include a call symbol, at the beginning, to redirect the input to the external data file. create a solution algorithm using pseudocode create a flowchart using RAPTORarrow_forwardPendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author’s name, the title of the work, and a volume number in the form Volume 9 of 9. For example, a set of three volumes requires three labels: Volume 1 of 3, Volume 2 of 3, and Volume 3 of 3. Design an application that reads records that contain an author’s name, the title of the work, and the number of volumes. The application must read the records until eof is encountered and produce enough labels for each work. Design a flowchart and psuedocode Pendant Publishing.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.Computer ScienceISBN:9781337569798Author:ECKERTPublisher:CENGAGE L
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L
Linux - Tutorial for Beginners in 13 MINUTES! [ UPDATED ]; Author: bai;https://www.youtube.com/watch?v=BMGixkvJ-6w;License: Standard YouTube License, CC-BY
What is Linux?; Author: Techquickie;https://www.youtube.com/watch?v=zA3vmx0GaO8;License: Standard YouTube License, CC-BY
Introduction to Linux and Basic Linux Commands for Beginners; Author: sakitech;https://www.youtube.com/watch?v=IVquJh3DXUA;License: Standard Youtube License