Question

What is a class?

What is a class?

Homework Answers

Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Class :

  • Class is a object oriented concept.
  • Class can contains methods , variables , access modifiers (protected , private and public) , constructor and destructor.
  • This means class is blueprint from which actual object is constructed.
  • Object can have identity,attribute and behaviour.
  • Class is declared with class keyword.
  • Syntax :class <class_name> {}
  • Example :class Trainer {}
  • Below is the details about class trainer


using System;
//C# class
class Trainer {
private int TrainerID;
private string TrainerName;
//constructor
public Trainer()
{
  
}
//class method
static void welcome() {
Console.WriteLine("Hello World");
}
}

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What is class intervals and class boundaries in statistics ? explain with examples .
What is class intervals and class boundaries in statistics ? explain with examples .
What is Class 1 & class 2 MHC molecule binding?
What is Class 1 & class 2 MHC molecule binding?
What is importance of social class?
What is importance of social class?
What is socio-economic class?
What is socio-economic class?
The probability that class ends early any day is .7. What is the probability class ends...
The probability that class ends early any day is .7. What is the probability class ends early more than 9 out of 15 days?
what is the therapeutic and pharmaceutic class of risperidone?
what is the therapeutic and pharmaceutic class of risperidone?
What is a protected class, and what laws exist that safeguard the rights of each protected...
What is a protected class, and what laws exist that safeguard the rights of each protected class? List the individual laws.
there are 23 people in this class. what is the probability that at least 2 of...
there are 23 people in this class. what is the probability that at least 2 of the people in the class share the same birthday
On the day of the announcement, what was the total loss in market value of class...
On the day of the announcement, what was the total loss in market value of class A and Class B shares combined based on data given in footnote 4. 4 The per-share change in Berkshire Hathaway’s Class A share price at the date of the announcement was $1,895. The company had 811,755 Class A shares outstanding and 1,247,366,163 Class B shares outstanding. Class B common shares are equivalent to 1/1500th of Class A common shares.
On the day of the announcement, what was the total loss in market value of class...
On the day of the announcement, what was the total loss in market value of class A and Class B shares combined based on data given in footnote 4. "FOOTNOTE 4: The per share change in Berkshire Hathaway's A Class share price at the date of the announcement was $1895. The company had 811,755 Class A shares outstanding and 1,247,366,163 Class B shares outstanding. Class B common shares are equivalent to 1/1500th of Class A common shares." $ 1.58 Billion...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT