EAD Lab 01: Objective

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

SE F13 Afternoon

04/03/2016

EAD Lab 01
Objective
The objective of this lab is to

Get familiar with Visual Studio 2012 IDE.


Understanding its solution structure (& relevant project settings)
Explore its debugging capabilities.
Understand of how to take user input from Console.
Implement code using foreach loop (wherever you use loop in these lab tasks; try using
foreach loop)
Know about named Arguments, Params keyword, Optional Argument
Know use of var keyword. (use var when initializing a variable instead of int, string
etc. and find out the difference.)

Tasks
Task 01
Write a Program that take an integer as an command line argument and calculate its factorial and display
on screen.
Task 02

Take name of Directory as Command line argument


Read name of all files in Directory
Display name if each file on console (use foreach loop)

Hint: use Directory.getfiles(nameofDirectory) to read name of all files in some array


Task 03
Write 3 Different functions that
1. First can take 1-5 integer and print their sum
2. Second can take many strings as parameters and display them (use Params)
3. Third can take name (String), Gpa(Float) and Age(int), but we can pass arguments in any order
eg(not programmatically correct example )
F1(name, age ,Gpa)
F1(age,name Gpa)
Task 04
Make a class calculator that have functions to add and multiply as many integers as are passes as
arguments. Then compile it as library project and make another class to test it

Hints: Use (csc /target:library

MathLibrary.cs ) command to make library file

and use command (csc /reference:MathLibrary.DLL MainProgram.cs ) to make it


reference in your code.

SE F13 Afternoon

04/03/2016

TASK 5:
You should know how to debug; viva of the debugging, step in, step over and Add watch will be
taken during your lab evaluation.

You might also like