Question

In: Computer Science

true or false C++ a.    (T or F)  A member of a class can be a method or...

true or false C++

a.    (T or F)  A member of a class can be a method or an attribute.

b.    (T or F)The private attributes of a class cannot be accessed by the public methods of that class.

c.    (T or F)  The initialization of a variable in the declaration

Ex:  int counter = 0;

is not allowed inside a class definition.

d.    (T or F)  In C++ a class is a definition; it does not exist in RAM until an object is created, using the definition.

e.     (T or F)  A member of a class that was created “on the stack” (locally) can be accessed by using the dot operator (.) followed by the member name.

Solutions

Expert Solution

ANS.a> correct option is:- true.

Explanation:- because within a class we can some features of class that are the attributes/object or some type of method/function.

Ans.b> correct option is :- true

Explanation:- because the private attribute of a class can only be accessed by the function or method inside the same class,i.e., only friend fiction or member function are allowed to access the private data attribute of a class.

Ans.c> correct option is :- false

Explanation:- because we can initialized the variable decleartion inside class detonation.

Ans.d> correct option is:- true

Explanation:- because if object is variable type then as the work is done everything will be gone,but it variable is defined then its permanent and can be used in every time you run the programming and value will be same.

Ans.e> correct option is:- true

Explanation:- because it used for direct member selection via object name.

Object.member


Related Solutions

true or false C++ a.    (T or F)   A function or method cannot return a value of type...
true or false C++ a.    (T or F)   A function or method cannot return a value of type array. b.    (T or F)   C++ throws an exception if you try to refer to element 47 in an array with 20 elements. c.    (T or F)   I can copy one array to another by simply using an assignment statement which assigns the one array to the other. d.    (T or F)  An exception is the occurrence of an erroneous or unexpected situation during the execution of a program. e.    (T...
true or false C++ a.    (T or F)  There can be no code between a try-block and its...
true or false C++ a.    (T or F)  There can be no code between a try-block and its associated catch-block. b.    (T or F)  The reserved word throw is used to signal that an exception has occurred. c.    (T or F)  The correct use of throw can be anywhere in a program; a try /  catch structure is used only in class definitions. d.    (T or F)  In C++, class is not a reserved word. e.    (T or F)  Class attributes have no fixed type; their type can be changed during...
Indicate whether the following statements are always true or can be false. (Select T-True, F-False. If...
Indicate whether the following statements are always true or can be false. (Select T-True, F-False. If the first is F and the rest T, enter FTTTTT). A) In order not to slow down, a bicycle moving at a constant velocity needs a small net force applied. B) If two objects have the same acceleration, they are under the influence of equal forces. C) If a net force acts on an object, the object's velocity will change. D) During the collision...
True or False—Indicate if the statement is True (T) or False (F) for each of the...
True or False—Indicate if the statement is True (T) or False (F) for each of the following 10 statements: __________ 1. While variable costs are always relevant to a business decision, fixed costs are not, and need to be analyzed closely to determine if they will be different amongst the alternatives being considered. __________ 2. Facility level costs often include costs such as rent, property taxes, building maintenance, and utilities; facility level costs benefit the production process as a whole...
18H. TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false....
18H. TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 11. Production of traded goods falls in countries that export them. 12. International trade allows the world to use its resources more efficiently but one country’s gains are another country’s losses. 13. A country’s ability to produce a specific good with fewer resources than another country determines whether it has an absolute advantage in producing the good. 14. Comparative advantage is based on the...
TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 1)...
TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 1) Accounting is an information system that identifies, measures, records and 1) communicates relevant information that objectively and correctly represents an organization's economic activities. 2) The main objective of accounting is to help people to invest in new products and 2) businesses. 3) A sole proprietorship is a business owned by one or more persons. 3) 4) Unlimited liability is an advantage for both a...
True/False Please write T if the statement is true or F if the statement is false:...
True/False Please write T if the statement is true or F if the statement is false: ____1. The contribution format income statement can be expressed in the following equation: Profit = (Sales – Variable expenses) – Fixed expenses.           ____2. The CM ratio can also be calculated by dividing the contribution margin per unit by the selling price per unit.      _____3.    Margin of safety in dollars = Total sales - Break-even sales        _____4.   The margin of safety cannot...
TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 6)...
TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 6) Compounding always requires the use of a financial calculator. 7) In the compound interest formula, i stands for periodic interest rate. 8) Interest calculated on a balance every three months is said to be compounded quarterly. 9) The present value of an annuity looks from the present to the future. 10) Annuities certain have a specific stated number of payments. 11) A bond quote...
True/False Type T (for True) or F (for False) for each statement for both Discrete and...
True/False Type T (for True) or F (for False) for each statement for both Discrete and Continuous random variables. Question 19 The cdf F(x) is strictly increasing. Discrete: Continuous: Question 20 The cdf F(x) is between 0 and 1 (inclusive). Discrete: Continuous: Question 21 The limit as x → ∞ of F(x) is 1. Discrete: Continuous: Question 22 If x1 is the largest value in the range of X, then F(x1) = f(x1). Discrete: Continuous: Question 23 The pf/pdf f(x)...
The following are five true-false questions. Write in whether true T or false F
The following are five true-false questions. Write in whether true T or false   FIn the short run, fixed costs are irrelevant in determining a firm's optimal level of output._______In the short run, a competitive firm will not produce unless price is equal to average total costs.__________If a purely competitive firm is producing a level of output greater than its profit-maximizing output, then marginal revenue is greater than marginal cost._________Economic profit is the difference between total revenue and marginal revenue_________Competitive firms...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT