Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

COP 3330 Exam II Questions and Answers Already Passed Latest Update

Beoordeling
-
Verkocht
-
Pagina's
7
Cijfer
A+
Geüpload op
07-10-2025
Geschreven in
2025/2026

COP 3330 Exam II Questions and Answers Already Passed Latest Update user cannot modify or access a contained class directly, modification and access must happen through the containing class. - Answers composition in ______________ a contained class is disposed when a containing class is disposed - Answers composition in _______________ a contained class can function independently. - Answers aggregation has a set size, is really fast, and is managed through the concept of scope - Answers the stack Data is added to the stack by way of ____________ - Answers static allocation ___________ happens when data is stored on the heap rather than the stack. - Answers dynamic allocation the new keyword - Answers is a request from your program to the operating system for a safe place to store some data keyword that can be used against a pointer that points to heap space - Answers delete steps to resizing an array - Answers - Create a new pointer that points to an area of heap space initialized to the desired size. - Copy the values from the old array to the new array. - Delete the old array. - Reassign the original pointer value to the new pointer value declared in step 1. the automatics: - Answers - default constructor - default destructor - assignment operator automatics - Answers program structures that happen automatically deep copy - Answers copies statically allocated data members AND dynamically allocated data members by setting up a separate heap space for the deep copy and then manually copying the values in the RHS object's heap storage into that new allocation on the heap shallow copy - Answers only copies statically allocated information rule of three when using DMA: - Answers 1. copy constructor 2. deep copy assignment overload 3. destructor copy constructor (rule of three): - Answers - creates an instance (i.e., an object) of the class' type. - takes in a parameter that is an object of the same type and copies the values from that parameter into the newly created object copies all of the data members from the preexisting object to the new object - Answers deep copy assignment overload (rule of three) destructor (rule of three): - Answers - delete statements that free up any dynamically allocated memory that was allocated during the object's lifecycle allows for algorithmic determination of the length of a c-style string - Answers null terminator strlen - Answers returns the length of a string strcpy - Answers Accepts two C-strings or pointers to two C-strings as arguments. The function copies the second C-string to the first C-string. The second C-string is left unchanged. strcmp - Answers compares two cstrings (case-sensitive) represents a "is a" relationship between a base class and a derived class - Answers inheritance syntax for declaring a derived class - Answers class DerivedClass : public BaseClass{}; "protected" - Answers any data members accessible to a derived class when you re-implement a base class function on a derived class - Answers function overriding when the compiler links declarations to definitions. - Answers binding the _____ keyword can be used to force binding to link declarations to the most derived class' implementation. - Answers virtual virtual functions can be marked purely virtual by adding what? - Answers " = 0" to the declaration any class that has at least one purely virtual function is called an - Answers abstract class a ________ happens when you make an array of base class pointers, which can be set to reference any base or derived class instance. - Answers polymorphic list aggregation - Answers the practice of combining classes into a larger, more complex class composition - Answers implemented the same as aggregation, but is a stronger relationship passing a parameter into a function by value - Answers function makes a copy of the parameter before anything else side effects will not happen to parameters passed in by ______ - Answers value

Meer zien Lees minder
Instelling
COP 3330
Vak
COP 3330

Voorbeeld van de inhoud

COP 3330 Exam II Questions and Answers Already Passed Latest Update 2025-2026

user cannot modify or access a contained class directly, modification and access must happen
through the containing class. - Answers composition

in ______________ a contained class is disposed when a containing class is disposed - Answers
composition

in _______________ a contained class can function independently. - Answers aggregation

has a set size, is really fast, and is managed through the concept of scope - Answers the stack

Data is added to the stack by way of ____________ - Answers static allocation

___________ happens when data is stored on the heap rather than the stack. - Answers dynamic
allocation

the new keyword - Answers is a request from your program to the operating system for a safe
place to store some data

keyword that can be used against a pointer that points to heap space - Answers delete

steps to resizing an array - Answers - Create a new pointer that points to an area of heap space
initialized to the desired size.

- Copy the values from the old array to the new array.

- Delete the old array.

- Reassign the original pointer value to the new pointer value declared in step 1.

the automatics: - Answers - default constructor

- default destructor

- assignment operator

automatics - Answers program structures that happen automatically

deep copy - Answers copies statically allocated data members AND dynamically allocated data
members by setting up a separate heap space for the deep copy and then manually copying the
values in the RHS object's heap storage into that new allocation on the heap

shallow copy - Answers only copies statically allocated information

rule of three when using DMA: - Answers 1. copy constructor

2. deep copy assignment overload

, 3. destructor

copy constructor (rule of three): - Answers - creates an instance (i.e., an object) of the class'
type.

- takes in a parameter that is an object of the same type and copies the values from that
parameter into the newly created object

copies all of the data members from the preexisting object to the new object - Answers deep
copy assignment overload (rule of three)

destructor (rule of three): - Answers - delete statements that free up any dynamically allocated
memory that was allocated during the object's lifecycle

allows for algorithmic determination of the length of a c-style string - Answers null terminator

strlen - Answers returns the length of a string

strcpy - Answers Accepts two C-strings or pointers to two C-strings as arguments. The function
copies the second C-string to the first C-string. The second C-string is left unchanged.

strcmp - Answers compares two cstrings (case-sensitive)

represents a "is a" relationship between a base class and a derived class - Answers inheritance

syntax for declaring a derived class - Answers class DerivedClass : public BaseClass{};

"protected" - Answers any data members accessible to a derived class

when you re-implement a base class function on a derived class - Answers function overriding

when the compiler links declarations to definitions. - Answers binding

the _____ keyword can be used to force binding to link declarations to the most derived class'
implementation. - Answers virtual

virtual functions can be marked purely virtual by adding what? - Answers " = 0" to the declaration

any class that has at least one purely virtual function is called an - Answers abstract class

a ________ happens when you make an array of base class pointers, which can be set to
reference any base or derived class instance. - Answers polymorphic list

aggregation - Answers the practice of combining classes into a larger, more complex class

composition - Answers implemented the same as aggregation, but is a stronger relationship

passing a parameter into a function by value - Answers function makes a copy of the parameter
before anything else

Geschreven voor

Instelling
COP 3330
Vak
COP 3330

Documentinformatie

Geüpload op
7 oktober 2025
Aantal pagina's
7
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$10.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
joshuawesonga22 Liberty University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
98
Lid sinds
1 jaar
Aantal volgers
1
Documenten
14145
Laatst verkocht
1 dag geleden
Tutor Wes

Hi there! I'm Tutor Wes, a dedicated tutor with a passion for sharing knowledge and helping others succeed academically. All my notes are carefully organized, detailed, and easy to understand. Whether you're preparing for exams, catching up on lectures, or looking for clear summaries, you'll find useful study materials here. Let’s succeed together!

3.9

9 beoordelingen

5
4
4
1
3
3
2
1
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen