Answer:
Option 2: instance
Explanation:
Instance method is a method that is called through an object created from a class.
In object oriented programming, we can define a class which is comprised of attribute(s) and method(s). We can create whatever number of objects from the class. Each object created from the class is known as Instance. Each of the class instances will possess same set of attributes and methods. To use the method, the syntax is as follows:
instanceName.methodName()
For example by presuming we have a class Rectangle with a method calcArea(). To call the calcArea() method, we need to create an object from the class and use it to call the method.
- Rectangle rect1 = new Rectangle(3, 5);
- rect1.calcArea();
Answer:
The output will be "C"; without the quotes
Explanation:
Given
The program above
Required
What will be the output if user input is 95
The output will be 95;
<em>Analysis</em>
1. Initially, grade = "Unknown"
grade = "Unknown";
2. Because user input is greater than 90, grade changes its value from "Unknown" to: grade = "A"
if (score >= 90)
grade = "A";
2. Because user input is greater than 80, grade changes its value from "A" to: grade = "B"
if (score >= 80)
grade = "B";
3. Because user input is greater than 70, grade changes its value from "B" to: grade = "C"
if (score >= 70)
grade = "C";
4. This will not be executed because it specifies that if user input is less than 70; Since, this statement is false; the value of grade is still "C"
else grade = "F";
5. The value of grade is printed
cout << grade;
Answer:
False.
Explanation:
Most computers have options that allow you to change the language if needed.