C# Object Oriented Programming

C# Object Oriented Programming

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

What is a class?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (10)

Section 1

(10 cards)

What is a class?

Front

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?

Front

Human mark = new Human( );

Back