The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
C# Class (Microsoft Visual Studio 2013)
Â
1.What is the difference between the == and = operator?
2.What is inheritance and why would we want to use it?
3.Why would we want to make various classes as opposed to having a single class?
4.Consider the following section of code from the definition of class OfficeBuilding.
public class OfficeBuilding
{
public int sqrFeet;Â
private string name;Â
protected double cost;Â
public OfficeBuilding() { … } protected bool isBuilt(){ … } public void moveIn(){ … }Â
public double rentSpace(){ … } private int renovate(int days) { … }
}
a.Which members/methods are visible to (accessible from) OfficeBuilding and its subclasses?
b.Which members/methods are visible to (accessible from) only the OfficeBuilding class?
c.Which members/methods are visible to (accessible from) any class?
5.Which of the following is correct?
A.The object is the blueprint, and we can have many instances of it, called classes
B.A class is like the blueprint, and we can have many instances of it called, which 
are called objects
C.There is no difference between a class and an object
D.The object keyword indicates we’re defining an object and the class keyword indicates we’re defining a class
6.What is the purpose of the %= operator?
7.Why are data structures important in programming?
8.Give an example of polymorphism. More specifically, provide/write a method (using C# syntax) in a base class so that it can be overridden in a derived class, and provide/write that method. The answer should only contain two methods.
9.Briefly describe the notion of a stream, and provide a brief example of how we used it in class.
10.What is the delegate keyword used for?
11.What is a lambda function?
Â
Answer in Word or PDf.
Â
C# Class (Microsoft Visual Studio)1.What is the difference between the == and = operator?2.What is inheritance and why would we want to use it?3.Why would we want to make various classes as opposed to having a single class?4.Consider the following section of code from the definition of class OfficeBuilding.public class OfficeBuilding{public int sqrFeet;private string name;protected double cost;public OfficeBuilding() { … }protected bool isBuilt(){ … }public void moveIn(){ … }public double rentSpace(){ … }private int renovate(int days) { … }}a.Which members/methods are visible to (accessible from) OfficeBuilding and itssubclasses?b.Which members/methods are visible to (accessible from) only the OfficeBuilding class?c.Which members/methods are visible to (accessible from) any class?5.Which of the following is correct?A.Theobjectis the blueprint, and we can have many instances of it, calledclassesB.Aclassis like the blueprint, and we can have many instances of it called, which arecalledobjectsC. There is no difference between aclassand anobjectD. The objectkeyword indicates we’re defining anobjectand the classkeyword indicateswe’re defining aclass6.What is the purpose of the %= operator?7.Why are data structures important in programming?8.Give an example of polymorphism. More specifically, provide/write a method (using C#syntax) in a base class so that it can be overridden in a derived class, and provide/write thatmethod. The answer should only contain two methods.9.Briefly describe the notion of a stream, and provide a brief example of how we used it inclass.10. What is thedelegatekeyword used for?11. What is a lambda function?
Attachments:
-----------