Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Absolute C++
Quiz 6: Structures and Classes
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
Essay
What is the reason for separating the interface from the implementation of an ADT?
Question 22
True/False
The scope resolution operator can be used with an object to qualify a member function.
Question 23
Essay
Here are several different initializations of a structure variable.State what happens in each initialization. struct WeatherData { int temperature; int windChill; int windSpeed; }; a)WeatherData prediction ={ }; b)WeatherData prediction ={40}; c)WeatherData prediction ={40,-10,}; d)x WeatherData prediction ={40,-10,20 };
Question 24
Essay
What is the error in the following structure definition? struct A { int b; int c; } int main() { A x; // other code }
Question 25
Essay
In the structure definition struct StudentRecord { int studentID; char grade; } give the structure tag,and each of the member names.
Question 26
Multiple Choice
C++ allows the programmer to deal with data at a higher level of abstraction in part because related data of differing types can be treated as a unit in
Question 27
True/False
The dot operator is used between an object and a data member or between a calling object and a call to a member function from the class of the object.
Question 28
Essay
Given the ShoeType structure type-definition.Write a function for the declaration (prototype). struct ShoeType { char style; double price; }; void setSalePrice(ShoeType& Item,double discountRate); //discountRate =(discounted price)/(regular price) //Adjusts sale price to reflect the specified discount.
Question 29
Essay
Carefully distinguish between the scope resolution operator,and the dot operator.
Question 30
Essay
It seems that mutator and accessor functions defeat the purpose of making the member variables private.Why is this not so?
Question 31
Essay
Carefully define mutator and accessor functions of a class.
Question 32
Essay
Given the ShoeType structure type definition.Write a function for the declaration (prototype). struct ShoeType { char style; double price; }; void readShoeRecord(ShoeType& Item); // Prompts for data and fills ShoeType argument members