Question: Using C#, Create a class class A in a namespace called spaceA . * The class has an attribute radius, which defaults to 1. *
Using C#, Create a class classA in a namespace called spaceA.
* The class has an attribute radius, which defaults to 1.
* One instance constructor that initializes the attribute radius when an instance is created
* It has two methods as described below:
- methodA - this is a static method that can only be accessed inside of the class. It calculates the area of a circle.
- methodB - this is a instance method that can be accessed from another class. It calculates the perimeter of a circle.
Create a class classA in a namespace called spaceB.
* The class has two attributes length and width, each of which defaults to 1.
* One instance constructor that initializes the attributes when an instance is created
* It has two methods as described below:
- methodA - this is a static method that can only be accessed inside of the class. It calculates the area of a rectangle.
- methodB - this is a instance method that can only be accessed inside of the class. It calculates the perimeter of a rectangle.
Create a class classA in a namespace called spaceC.
* classA only has a main method.
- if a method in spaceA or spaceB can be called, it will called in this Main method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
