0% found this document useful (0 votes)
12 views6 pages

Assignment 1

Uploaded by

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

Assignment 1

Uploaded by

rikido251
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

C# BASICS

T r a in i n g As s ig n m en t s

Document Code 25e-BM/HR/HDCV/FSOFT

Version 1.1

Effective Date 20/11/2012

Hanoi, 06/2019
Lab Guides C# Basics Issue/Revision: x/y

RECORD OF CHANGES

No Effective Date Change Description Reason Reviewer Approver

1. 01/Oct/2018 Create new Draft

2. 01/Jun/2019 Update template Fsoft DieuNT1


template

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 2/6


Lab Guides C# Basics Issue/Revision: x/y

Contents
Assignment 1: Basic Project..............................................................................................................4
Objectives:....................................................................................................................................4
Business needs:...........................................................................................................................4
Working requirements:................................................................................................................4
Product architecture:...................................................................................................................4
Technologies:...............................................................................................................................4
IO:...................................................................................................................................................4
Technical Requirements:.............................................................................................................4
1. Exercise 1................................................................................................................................5
2. Exercise 2................................................................................................................................5
3. Exercise 3................................................................................................................................5
4. Exercise 4................................................................................................................................5

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 3/6


Lab Guides C# Basics Issue/Revision: x/y

CODE: NPL.M.A001
TYPE: MEDIUM
LOC:
DURATION: 120 MINUTES

Assignment 1: Basic Project


Objectives:

» Understand and practice basic of C#.


» Practice code in Visual Studio
» Follow coding convention.

Business needs:

» TBD

Working requirements:

» Working environment: Visual Studio 2022 or higher.


» Practice code in Visual Studio
» Each exercise is one project inside 1 solution.
» Delivery: Source code, deployment and testing, reviewing evident packaged in a compress archive.

Product architecture:

» N/A

Technologies:

The product implements one or more technology:


» C# basic
» Control of Flows

IO:

» Console windows

Technical Requirements:

 Solution name must be NPL.M.A001.


 Must create projects corresponding to each exercise:
NPL.M.A001.Exercise1.
NPL.M.A001.Exercise2.
NPL.M.A001.Exercise3.
NPL.M.A001.Exercise4.

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 4/6


Lab Guides C# Basics Issue/Revision: x/y

1. Exercise 1

Write code to evaluate of a polynomial:


ax2+bx+c=0
Find x
Complete your code inside NPL.M.A001.Exercise1.
Run and check the result

Estimated time: 30 mins

2. Exercise 2

Write code to convert number from base 10 to base 2 (natural number to binary number).

Example: 13 -> 1101

Complete your code in ConvertToBinary() method inside NPL.M.A001.Exercise2.

Run and check the result

Estimated time: 30 mins

3. Exercise 3

Write code to print list n number of Fibonacci. Each number is printed in 1 line.

Example: input number 5

Complete your code in PrintFibonacci() method inside NPL.M.A001.Exercise3.

Update all comments in the project

Run and check the result

Estimated time: 30 mins

4. Exercise 4

Write code to check a positive integer is prime number or not.

Example:

5 is prime number

6 is NOT prime number

7 is prime number

Complete your code in CheckPrimeNumber() method inside NPL.M.A001.Exercise4.

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 5/6


Lab Guides C# Basics Issue/Revision: x/y

Update all comments in the project

Run and check the result

Estimated time: 30 mins

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 6/6

You might also like