Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

CP2-Module 8

Introduction to OOP: Basic Concepts, Member Functions, and Inheritance.

QuestionAnswer
A behavior of an object is called: Method Abstract class Property Method
It is an identifiable entity with some characteristics and behavior Properties Methods Class Object Object
Which of the following has a correct C++ class definition? class Student {}: class Student {}; class Student; class Student () class Student {};
Objects created are based on what? abstract behavior class attributes class
What operator is used to access a data member or a member function? dot (.) operator + operator & operator == operator dot (.) operator
It means displaying only essential information and hiding the details. Methods Class Abstraction Object Abstraction
Refers to binding together the data and the functions that manipulate them Objects Encapsulation Class Abstraction Encapsulation
Which is not a feature of OOP in general definitions? Duplicate/Redundant Data Code reusability Efficient code Modularity Duplicate/Redundant Data
Pick out the other definition of objects. attribute of the class associate of the class member of the class instance of the class instance of the class
What symbol is used to define a function outside of the class? :: & <> : ::
If an object named Apple has a member named "price", what is the command to assign a value of 15 into it? Apple.price == 15; Apple(15); Apple.price = 15; Price(15); Apple.price = 15;
Which of the following statements is correct in C++? Structures can have functions as members Classes cannot have data as protected members. Class members are public by default. Structure members are private by default Structures can have functions as members
Which of the following concepts means wrapping up of data and functions together? Inheritance Encapsulation Abstraction Object Encapsulation
The default access specifier for the class members is: none of the given protected public private private
Which of the following is an abstract data type? double int class string class
Which of the following term is used for a function defined inside a class? Member function Classic function Class function Member Variable Member function
A Function that has its definition or its prototype within the class definition like any other variable. Member Functions Objects Data Member Class Member Functions
If an object named Box has a member of length, what is the command to assign a value of 5 into it? Box.length = 5; Box.length == 5; Length = 5; Box(5) Box.length = 5;
Which concept of OOP is false for C++? Code can be written without using classes Code must contain at least one class At least one object should be declared in code A class must have member functions Code must contain at least one class
What is the difference between struct and class in C++? Members of a class are private by default and members of struct are public by default.
Blueprint of an object Inheritance Object Class Data Members Class
If there is a class named Student and you want to create an object name "firstyear", what would be the correct syntax student firstyear student firstyear() student first year; Student firstyear Student firstyear
Which of the following best defines a class? Instance of an object Blueprint of an object Scope of an object Parent of an object Blueprint of an object
How many classes can be defined in a single program? Only 999 Only 100 Only 1 As many as you want As many as you want
What is the output of the given program? #include<iostream> using namespace std; main() { class student { int rno = 10; } v; cout<<v.rno; } Group of answer choices Error 0 10 Garbage value Error, variables inside a class cannot be initialized at declaration like that. "rno" is also a private member/instance variable.
What is the output of this program? class Test { int x; }; int main() { Test t; cout << t.x; return 0; } Group of answer choices -1 0 Garbage value Error Error, "x" is a private member/instance variable.
What is the difference between a struct and a class in C++? A struct cannot have member functions A struct cannot have private members A class has a default privacy specification of private A class has a default privacy specification of public A class has a default privacy specification of private
If a class is named Car and you will create an object named SportsCar, what would be the statement? Car<SportsCar>; SportsCar Car; Car SportsCar; Car (SportsCar); Car SportsCar;
It refers to the blueprint of an object: Inheritance Access Modifier Class Data Class
If a class is named Fruits and you will create an object named Apple, what would be the statement? Fruits Apple; Apple Fruits; Apple@Fruits; Fruits(Apple); Fruits Apple;
Which of the following are available only in the class hierarchy chain? Protected data members Member functions Public data members Private data members Protected data members
Created by: Easy Kwatro
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards