• Get now! COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%) Link to COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%) For free COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%) service manual COMP 220 COMP220 Final Exam 4 (Scored 100%) COMP 220 COMP220 Final Exam 4 (Scored 100%) (TCO 1) Describe an example of a two-dimensional character array that could be used to hold a set of text data that might be displayed on a hand-held
  • information display device such as an MP3 player. Describe what each of the two-dimensional characters might represent and the data that would be held in the array. Also, provide an example array declaration. (Points. 10) Ð’Â (TCO 2) Explain the difference between a parameterized constructor and a default constructor. Provide an example class that includes both types of constructors. (Points. 10) 3. (TCO 3) Assume that a definition of class Automobile has two composite objects called myEngine of class Engine and myTransmission of class Transmission. If an object of Automobile is instantiated and then goes out of scope, list the sequence in which all the constructors and destructors are called. Also, provideÐ’Â an explanation ofÐ’Â how they are called in this sequence. (Points. 10) 4. (TCO 4) Without considering the access attributes, list and describe which base class members may not be inherited by a derived class, and provide a rationale for why. (Points. 10) 5. (TCO 5) Write all the code necessary to dynamically allocate an array of 10 double-precision, floating-point variables and then write the code that will deallocate the memory. Add comment fields to each line of code describing what it is and does. (Points. 10) 6. (TCO 6) Assume thatÐ’Â three objects of the class Inductor have been instantiated: L1, L2, and L3. Write the overloaded operator prototypes that would be required to perform the following operation. You are only required to write the prototypes, not the implementation code. + L2; (Points. 10) 7. (TCO 7) Define what is meant by the term compile-time binding, and list two other terms that are also used to describe it. Explain why compile-time binding can present problems when implementing polymorphism in a program. (Points. 10) 8. (TCO 8) Describe and define what the preprocessor statement is, how it is used, what part of the development environment it interacts with, and provide a syntactically correct example thatÐ’Â describes what it does. (Points. 10) COMP220 Final Exam 3 (Perfect Tutorial Scored 100%) for (; j 2) alpha[j - 1] = alpha[j] + 2; (Points. 4) None of these 4. (TCO 1) Suppose that the array alpha is to be declared as a formal parameter in a function heading. Which of the following about alpha is true? 6. (TCO 3) Aggregation is also sometimes called ______. (Points. 4) inheritance instantiation composition encapsulation 7. (TCO 4) Which of the following statements about inheritance is true if the memberAccessSpecifier is protected? (Points. 4) The private members of the base class become protected members of the derived class. The derived class can directly access any member of the base class. The public members of the base class become protected members of the derived class. The protected members of the base class become private members of the derived class. 8. (TCO 4) If class AClass is derived from class BClass, which one of the following statements correctly states the constructor call sequence when an object of class AClass is instantiated? (Points. 4) BClass constructor first, AClass constructor second AClass constructor first, BClass constructor second BClass constructor only, the AClass constructor is not called if AClass derived private from BClass AClass constructor only, the BClass constructor is not called if BClass derived private from AClass 9. (TCO 4) Which of the following relationships is not a correct example of inheritance? (Points. 4) Parent to Children Aunt to Uncle Grandparent to Grandchild Father and Mother to Children 10. (TCO 5) If p is a pointer variable of type int and num is an int variable, what is the result of the statement p = #? (Points. 4) p is equal to num. p is equal to the address of num. num is equal to the address of p. p and num are concatenated and assigned to p. 11. (TCO 5) For the statement char *p, how many bytes of storage are allocated on a Pentium class system using 32-bit addressing? (Points. 4) 12. (TCO 5) Which of the following statements correctly allocates space to store 15 real numbers? (Points. 4) Contact Us 1.  (TCO 1) Given the following array declaration and program statement, describe–in detail–the condition and what potential problems could occur if a program containing both was compiled and executed. 2. (TCO 2) Compare and contrast constructors and destructors. Provide an example class that includes both a constructor and a destructor function. (Points. 10) 3. (TCO 3) Assume that a definition of class Automobile has two composite objects called myEngine of class Engine and myTransmission of class Transmission. If an object of Automobile is instantiated and then goes out of scope, list the sequence in which all the constructors and destructors are called. Also, provide an explanation of how they are called in this sequence. (Points. 10) 4. (TCO 4) Explain how access privileges affect members of the derived class and the objects created from them. 5.(TCO 5) Describe what a memory leak is and why it could cause problems. 6. (TCO 6) Assume that three objects of the class Inductor have been instantiated: L1, L2, and L3. Write the overloaded operator prototypes that would be required to perform the following operation. You are only required to write the prototypes, not the implementation code. 7.(TCO 7) Define what is meant by the term run-time binding, and list two other terms that are also used to describe it.  (Points. 10) 8.(TCO 8) For a multifile project that contains just one class, list and describe each of the files that would be required to implement and test Get now! COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%)
Please download to view
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
...

COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%)

by ann

on

Report

Category:

Documents

Download: 0

Comment: 0

212

views

Comments

Description

Download COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%)

Transcript

  • Get now! COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%) Link to COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%) For free COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%) service manual COMP 220 COMP220 Final Exam 4 (Scored 100%) COMP 220 COMP220 Final Exam 4 (Scored 100%) (TCO 1) Describe an example of a two-dimensional character array that could be used to hold a set of text data that might be displayed on a hand-held
  • information display device such as an MP3 player. Describe what each of the two-dimensional characters might represent and the data that would be held in the array. Also, provide an example array declaration. (Points. 10) Ð’Â (TCO 2) Explain the difference between a parameterized constructor and a default constructor. Provide an example class that includes both types of constructors. (Points. 10) 3. (TCO 3) Assume that a definition of class Automobile has two composite objects called myEngine of class Engine and myTransmission of class Transmission. If an object of Automobile is instantiated and then goes out of scope, list the sequence in which all the constructors and destructors are called. Also, provideÐ’Â an explanation ofÐ’Â how they are called in this sequence. (Points. 10) 4. (TCO 4) Without considering the access attributes, list and describe which base class members may not be inherited by a derived class, and provide a rationale for why. (Points. 10) 5. (TCO 5) Write all the code necessary to dynamically allocate an array of 10 double-precision, floating-point variables and then write the code that will deallocate the memory. Add comment fields to each line of code describing what it is and does. (Points. 10) 6. (TCO 6) Assume thatÐ’Â three objects of the class Inductor have been instantiated: L1, L2, and L3. Write the overloaded operator prototypes that would be required to perform the following operation. You are only required to write the prototypes, not the implementation code. + L2; (Points. 10) 7. (TCO 7) Define what is meant by the term compile-time binding, and list two other terms that are also used to describe it. Explain why compile-time binding can present problems when implementing polymorphism in a program. (Points. 10) 8. (TCO 8) Describe and define what the preprocessor statement is, how it is used, what part of the development environment it interacts with, and provide a syntactically correct example thatÐ’Â describes what it does. (Points. 10) COMP220 Final Exam 3 (Perfect Tutorial Scored 100%) for (; j 2) alpha[j - 1] = alpha[j] + 2; (Points. 4) None of these 4. (TCO 1) Suppose that the array alpha is to be declared as a formal parameter in a function heading. Which of the following about alpha is true? 6. (TCO 3) Aggregation is also sometimes called ______. (Points. 4) inheritance instantiation composition encapsulation 7. (TCO 4) Which of the following statements about inheritance is true if the memberAccessSpecifier is protected? (Points. 4) The private members of the base class become protected members of the derived class. The derived class can directly access any member of the base class. The public members of the base class become protected members of the derived class. The protected members of the base class become private members of the derived class. 8. (TCO 4) If class AClass is derived from class BClass, which one of the following statements correctly states the constructor call sequence when an object of class AClass is instantiated? (Points. 4) BClass constructor first, AClass constructor second AClass constructor first, BClass constructor second BClass constructor only, the AClass constructor is not called if AClass derived private from BClass AClass constructor only, the BClass constructor is not called if BClass derived private from AClass 9. (TCO 4) Which of the following relationships is not a correct example of inheritance? (Points. 4) Parent to Children Aunt to Uncle Grandparent to Grandchild Father and Mother to Children 10. (TCO 5) If p is a pointer variable of type int and num is an int variable, what is the result of the statement p = #? (Points. 4) p is equal to num. p is equal to the address of num. num is equal to the address of p. p and num are concatenated and assigned to p. 11. (TCO 5) For the statement char *p, how many bytes of storage are allocated on a Pentium class system using 32-bit addressing? (Points. 4) 12. (TCO 5) Which of the following statements correctly allocates space to store 15 real numbers? (Points. 4) Contact Us 1.  (TCO 1) Given the following array declaration and program statement, describe–in detail–the condition and what potential problems could occur if a program containing both was compiled and executed. 2. (TCO 2) Compare and contrast constructors and destructors. Provide an example class that includes both a constructor and a destructor function. (Points. 10) 3. (TCO 3) Assume that a definition of class Automobile has two composite objects called myEngine of class Engine and myTransmission of class Transmission. If an object of Automobile is instantiated and then goes out of scope, list the sequence in which all the constructors and destructors are called. Also, provide an explanation of how they are called in this sequence. (Points. 10) 4. (TCO 4) Explain how access privileges affect members of the derived class and the objects created from them. 5.(TCO 5) Describe what a memory leak is and why it could cause problems. 6. (TCO 6) Assume that three objects of the class Inductor have been instantiated: L1, L2, and L3. Write the overloaded operator prototypes that would be required to perform the following operation. You are only required to write the prototypes, not the implementation code. 7.(TCO 7) Define what is meant by the term run-time binding, and list two other terms that are also used to describe it.  (Points. 10) 8.(TCO 8) For a multifile project that contains just one class, list and describe each of the files that would be required to implement and test Get now! COMP 220 COMP220 Final Exam 6 (Perfect Tutorial Scored 100%)
Fly UP