0% found this document useful (0 votes)
16 views1 page

Class

Uploaded by

heshamdahy5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Class

Uploaded by

heshamdahy5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1) Write a c# program that creates a class 'Person' with properties for

name, age, and country. Include a function to print the person's


details.

2) Write a c# program that creates a class 'Rectangle' with properties


for width and height. Include a function to calculate the rectangle
area.

3) Write a c# program that creates a class 'Car' with properties for


make, model, and year. Include a function to display car information.

4) Write a c# program that creates a class 'Book' with properties for


title, author, and publication year. Include a function to display book
details.

5) Write a c# program that creates a class 'Product' with properties for


name, price, and quantity. Calculate the total cost of the product with
a function.

6) Write a c# program that creates a class 'Animal' with properties for


name and sound. Include a function to make the animal's sound.

7) Write a c# program that creates a class 'BankAccount' with


properties for account number, balance, and account holder name.
Include deposit and withdrawal functions.

8) Write a c# program that creates a class 'Triangle' with side length


properties. Include a function to calculate the triangle perimeter.

You might also like