A class is a blueprint for an object. In many ways, it is like DNA to a human or animal.
Back
What are out-of-the-box examples of Types?
Front
Int, String, Double, Float, etc.
Back
What is a property or attribute?
Front
A property is a specific characteristic of a class; a value with meaning.
Back
Can you make your own Type?
Front
Yes, each Class is a declaration of a New Type.
Back
What does Object Oriented Programming mean?
Front
It means, we can think of a software program as a set of distinct objects working together.
Back
What is a method?
Front
A method is an action, or verb, within a class.
Back
How do you create a constructor method (class Human)?
Front
class Human
{
public int Age;
public int Height;
public double Weight;
public string Name;
Human( int age, int height, double weight, string name)
{
Age = age;
Height = height;
Weight = weight;
Name = name;
}
}
Back
How would you define a class for a Human with the following attributes: age, height, weight, name?
Front
class Human
{
private int Age;
private int Height;
private double Weight;
private string Name;
}
Back
What is an object?
Front
An object is a manifestation of a class; or in programmer talk, an instantiation of a class.
Back
How would you instantiate an object of the Type Human?