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 7RQ
Program Description Answer
In a class, an application can access the private variables using the properties created by the Public Property procedures.
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
Static variables can...
...can be accessed even without creating an object of that class.
...only be accessed by static methods.
...not be accessed using class prefix.
...not be inherited.
For variables with private access modifier in a class, select all the apply
a.
b. Cannot be accessed using get methods
Can be directly accessed outside the class
C.
Cannot be directly accessed outside the class
d.
Can be accessed using get methods
create a class called employee 2. use the init function to collect the employee information (name, email and mobile phone) 3. Instantiate the employee class two times with different information 4. display all the properties of the object
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
- How to access the object in the class? Select one: a.Scope resolution operator b.Direct member access operator (.) c.None of the options d. Ternary operatorarrow_forwardA. You can invoke an instance method or reference an instance variable from a static method. B. You can invoke a static method or reference a static variable from an instance method. * Options: Only A is true Both A and B are true Both A and B are false Only B is true Note: Answer the correct optionarrow_forwardThe non-static class level variables and non-static methods of a class are known as a. instance members b. object behaviors c. object attributes O d. object referencesarrow_forward
- How to access the object in the class? Select one: a.None of the options b.Direct member access operator (.) c. Ternary operator d.Scope resolution operatorarrow_forwardTrue or FalseIt is a common practice to make all a class’s fields private and to provide access to those fields through methods.arrow_forwardPractice with writing a program that contains three classes: Ship CruiseShip CargoShip Classes Design a Ship class with the following members: A field for the name of the ship (a string) A field for the year that the ship was built (a string) A constructor that accepts two arguments for the two fields, and appropriate accessors and mutators A toString method that returns a string with the ship’s name and the year it was built Design a CruiseShip class that extends the Ship class. The CruiseShip class should have the following members: A field for the maximum number of passengers (an int) A constructor that accepts three arguments for the three fields and appropriate accessors and mutators A toString method that overrides the toString method in the base class. The CruiseShip class’s toString method should return a string with only the ship’s name and the maximum number of passengers. Design a CargoShip class that extends the Ship class. The CargoShip class should have the…arrow_forward
- Describe the class's private and public components.arrow_forwardWhen you pass an object that is an instance of a class as an argument, what is passed into the parameter variable?arrow_forwardWhat is a static variable? Group of answer choices 1. None of the options are correct. 2. A variable that is common among all instances of the class, and can be accessed without any instantiation of the class. 3. Variables cannot be static, only methods can. 4. A variable whose value remains fixed after creation, and cannot change. 5. A variable that gets destroyed when the instance of the class is no longer used.arrow_forward
- QUESTION 19 Which of the following methods are used to only obtain the value of an object's instance variables? Mutator methods Accessor methods Constructor methods Overloaded methodsarrow_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_forwardThe reference this can be used to refer to an object or to invoke another constructor of the same class. True Falsearrow_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
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