MCIT 591 Final Exam
Can you instantiate an interface? - ANS-NO
Define the "heap" - ANS-a bigger block of reminiscence that is slower to get right of entry to,
however because it is so enormous can store plenty more reminiscence
Define the "stack" - ANS-smaller block of reminiscence this is fast to get right of entry to, and is
in which small information such as integers and booleans are saved
Define Upcasting - ANS-Going to a more fashionable facts type ( Example: casting a canine as
an animal)
How does the default .Sort() method kind gadgets? - ANS-From least to finest
How would we tell if a class is a infant or determine? - ANS--If it has an "is a" courting
-Example) Goalkeeper "is a" Player
How would you name a java program from the terminal? - ANS-javac Filename.Java
If you've got a toddler class that is extended a parent class, and that determine elegance has a
covered approach, can the kid class make use of that technique? - ANS-Yes! The best time it
couldn't ( as a long way as I understand) is whilst the technique is personal
Liskov Substitution Principle - ANS-in any line of code, a category can usually be replaced by
using one in every of its subclasses. An interface can constantly be replaced through a few
implementation of that interface
Method Signature - ANS-name of the technique and the technique parameters along side their
data kinds
Polymorphism - ANS-precept that lets in the equal technique to exist in exceptional bureaucracy
Select all that are correct. Why do not we simply upcast everything to Objects?
A) You lose the methods and properties that provide Object-Oriented Programming its power
B) No motive, I am going to do this in all of my code now!
C) You then need to fear approximately ClassCastExceptions when downcasting
D)You need to downcast to regain these methods and houses - ANS-A,C,D
True or False, assertEquals makes use of .Equals() - ANS-True
Can you instantiate an interface? - ANS-NO
Define the "heap" - ANS-a bigger block of reminiscence that is slower to get right of entry to,
however because it is so enormous can store plenty more reminiscence
Define the "stack" - ANS-smaller block of reminiscence this is fast to get right of entry to, and is
in which small information such as integers and booleans are saved
Define Upcasting - ANS-Going to a more fashionable facts type ( Example: casting a canine as
an animal)
How does the default .Sort() method kind gadgets? - ANS-From least to finest
How would we tell if a class is a infant or determine? - ANS--If it has an "is a" courting
-Example) Goalkeeper "is a" Player
How would you name a java program from the terminal? - ANS-javac Filename.Java
If you've got a toddler class that is extended a parent class, and that determine elegance has a
covered approach, can the kid class make use of that technique? - ANS-Yes! The best time it
couldn't ( as a long way as I understand) is whilst the technique is personal
Liskov Substitution Principle - ANS-in any line of code, a category can usually be replaced by
using one in every of its subclasses. An interface can constantly be replaced through a few
implementation of that interface
Method Signature - ANS-name of the technique and the technique parameters along side their
data kinds
Polymorphism - ANS-precept that lets in the equal technique to exist in exceptional bureaucracy
Select all that are correct. Why do not we simply upcast everything to Objects?
A) You lose the methods and properties that provide Object-Oriented Programming its power
B) No motive, I am going to do this in all of my code now!
C) You then need to fear approximately ClassCastExceptions when downcasting
D)You need to downcast to regain these methods and houses - ANS-A,C,D
True or False, assertEquals makes use of .Equals() - ANS-True