Current project contains Car.cs file. It is an example of simple class. Take a look at the example and perform the following task:
Create a new Employee class in separate file
Add 2 fields which contains the following information:
- Surname
- Age Fields must NOT be accessible from outside of the class.
Add 2 contstructors to Employee class:
- The firts contstructor without parameters
- The second contstructor should accept 2 arguments in order to initialize a new Employee entirely
Add 3 methods to Employee class:
- The first method should NOT be accessible from outside of the class. It should return age value in string format;
- The second method should change employee surname with new value, which must be passed to the method;
- The third method must return employee info in the string format: "Surname: {Employee.surname}, Age: {Employee.age}"
StwUser/Task13
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Task13MyVersion
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published