100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Cisc 181 exam 2 questions with verified answers graded A+

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
10-03-2025
Written in
2024/2025

Cisc 181 exam 2 questions with verified answers graded A+

Institution
Cisc 181
Course
Cisc 181









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Cisc 181
Course
Cisc 181

Document information

Uploaded on
March 10, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Cisc 181 exam 2 questions with verified
answers graded A+

Default values - correct answer ✔✔Any method or function can provide default values for its
parameters in the function signature



We can add methods to our classes to create ___ that ___ methods that can work on that data -
correct answer ✔✔Objects, encapsulates



If member variables are public, we can't - correct answer ✔✔Change the internal
representation (ex: Person class with age variable set as number, but later on I change it to
string, this messes the code all up). Accessible from anywhere. Can access public members in
subclass



Super - correct answer ✔✔Calls constructor of parent and rages whatever args as constructors



If they are private, - correct answer ✔✔Hides info from users. Our class will have a public
interface which may be separate from its internal representation. Can be changed so long that
the public interface still works as expected (since users don't have direct access anyways)



How to deep copy? - correct answer ✔✔Teach each class how to clone itself, then use these
methods if we have a class that contains another class (composition)



What if it contains a primitive type inside? - correct answer ✔✔If we use spread it creates
shallow copy. We need to iterate through the array given, clone each, create a new array of
clones that we can pass to constructor of the new object

, Method - correct answer ✔✔A function that is associated with an object and called using dot
notation.



Composition - correct answer ✔✔When a class contains another class we add the second class
as a property of the first



Inheritance - correct answer ✔✔Build complex hierarchies of objects in order to define new
types that are a type of some existing type



is-a vs. has-a - correct answer ✔✔- Is-A: used to describe -> child of a parent class

- Example: Inheritance

Phone class is a (or is a type of) Device (also a class)



- Has-A:

-> Is used to describe the characteristics that define an object

data members that have a relationship to the class

-> Example: composition

Class Color is used in Class Point. The point has a (or contains a) color



Extends - correct answer ✔✔creates the inheritance relationship between subclass (child) and
superclass (parent). What we extend- the superclass

What we create by extending- subclass



How to call superclass constructor within subclass constructor - correct answer ✔✔Super()
takes same args as constructor of superclass



Private - correct answer ✔✔Only accessible within the class.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BravelRadon Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
886
Member since
4 year
Number of followers
540
Documents
42741
Last sold
1 day ago
EXAM HUB

Welcome to Exam Hub Are you looking for high-quality, exam-ready notes, past papers, Test Banks, and well-researched study materials to boost your grades? You’re in the right place! I create and upload detailed, easy-to-understand, and well-structured documents across multiple subjects. All my materials are designed to help you study , save time, and excel in your coursework and exams! On this page NURSING EXAMS,STUDY GUIDES,TESTBANKS AND QUALITY EXAMS IS THE KEY TO STUDENTS CAREER EXCELLENCE, you find all documents, package deals, and flashcards offered by BravelRadon (EXAM HUB STORES!)....kindly recommend a friend for A+ GARANTEEd either you are a first-year student or final-year graduation! best of luck!

Read more Read less
3.5

157 reviews

5
57
4
30
3
32
2
8
1
30

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions