https://github.com/prak112/csharp-finalexam
Final assignment at Devshool (Sakky) for C#. Description and code for tasks resolved.
https://github.com/prak112/csharp-finalexam
csharp learning-code
Last synced: about 1 year ago
JSON representation
Final assignment at Devshool (Sakky) for C#. Description and code for tasks resolved.
- Host: GitHub
- URL: https://github.com/prak112/csharp-finalexam
- Owner: prak112
- Created: 2023-05-23T17:36:53.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-29T13:15:24.000Z (about 3 years ago)
- Last Synced: 2025-01-15T01:41:57.418Z (over 1 year ago)
- Topics: csharp, learning-code
- Language: C#
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Course Exam
## Tasks
1. Build logic for acceptable format of phone number from user input in Main()
2. Build method to create username from user input (firstname, lastname) in Main() as Static Method
3. Build class "Javelin Throw" with following properties :
- id (int)
- athleteName (string)
- meters (int/double)
- centimeters (int/double)
## Task 1
- The following criteria must be implemented :
- length of 13 characters
- starts with +358
- verifiy if all characters are numbers within range of 0-9
- application notifies whether entered number is acceptable or not
## Task 2
- The following criteria must be implemented :
- accept user input (firstname, lastname)
- USERNAME = first 3 letters of firstname + first 5 letters of lastname
- example :
```
firstname = "Lumi"
lastname = "Ukkonen"
username = "UkkonLum"
```
## Task 3
- Create Classes in following categories :
- JavelinThrow :
- Properties:
- id (int)
- name (string)
- throwDistance_inMeters (double)
- throwDistance_inCentimeters (double)
- Product :
- Properties :
- id (int)
- name (string)
- price (decimal)
- Methods :
- CalculateDiscountedPrice(decimal), for 20% discount