Distances tasks

Reading data from a file

Create a console application that reads numbers from a file. Sort numbers from smallest to biggest and show them in a console each number in own line. In the file each number is own row, and there can be rows from one to about a thousand. Create and name a test textfile yourself, and place the file for example to c:\temp folder. The file name must be defined in the starting argument of the program. Use normal try-catch-finally -exception handling.

Reading data from console and writing to a file

Create a console application that reads positive numbers that an end user gives as long as user want to stop giving numbers. If the end user gives a number bigger than 0, put the number to an array. If user gives number zero we will end the reading. If user gives a number below zero or if the number is not valid number, the application will give a warning.
After the user has ended giving number, the application writes numbers to a file named in the starting argument of the program , each number to own row. Use normal try-catch-finally -exception handling, no other error handling needed yet.

Lotto checker

We have numbers of drawns of Finnish Lotto in a file. Use your application that you made in this week's lesson to create the file.

The file has following format:

38/2003
1 19 20 21 37 38 39
12 14 16 20 22 25 39
and so on ...

We have to check have we win and how much.  Create a checker application where you put the right Lotto numbers of the week and how much you would win if you had seven, six, five etc right. The application checks a file that an user gives. In file selection the user can select a file with standard Open -windows. The application counts how much you would win or lose. 
You can find the right numbers of the Finnish Lotto for example from here: www.veikkaus.fi and select Tulokset. A Lotto drawn costs 60 c.

Application for handling data of our customers

Create a Windows application where an end user can enter data of a customer. Data will be written to a spesific XML-file. We want to keep following data from our customers: customer id, first name, last name, company, occupation/work title, category, e-mail address. Gategories are: prospect, project customer, product customer, subcontractor.

Create also functionality to list all customers in a category. So if an end user select the prospect category, the application will so all our prospects in a table.

Datareader for customers

Create a Windows application where an end user can look data of customers. Data is located in Access database customers in the table person. Create connection to database with  Microsoft.Jet.4.0 provider. Use datareader to show all customers in a listbox.

Half-way estimation

We are almost in half-way of our course. Estimate and give feedback about the course. Put the following headings to your estimate:
1 What I have learnt

2 What has been easy, what has been difficult, has some parts been tought too quickly

3 What shoud I learn more

4 What do I want to learn more, so what are most interesting subjects

5 Open questions

6 Suggestions, questions, ideas...

7 Brickbats and/or bouquets for the lecturer about...

Three tier db application for handling data of our customers

Sometimes it is wise to split a db application to three tiers: UI-tier, BL-tier and DB-tier. BL means Business Logic. Create a Windows application where an end user can view, add, update and delete data of customers. Data is located in Access database customers in the table person. There are three tables in db: person, company and category and two tables for relations. You can create also same database to SQLServer if you want to. See picture.

Create a class that handles Business logic of transfering data from UI to DB. Create methods and properties, plan and design functionality of BL-tier before you start programming. Think where you should create connection and so on. 

Your own database application

Create a databased application where data is read, updated, written, deleted from/in database via ADO.NET. You can select the subject or business area of ypour application, It can be also from your hobbies or interests or an example in other course. Only demand is that it must be unique. Create needed database to SQL Server with needed tables, and so on. When you return this task write to the mail introduction of the application, for what is has been made, and so on. Explain also structure of tha database and application with words and pictures, use UML if possible.

Simple calculators with C# AND webforms

Create two simple calculators 1) with C# scripts AND 2) with webforms. In a webpage there is two textboxes to where an user can write numbers. There is five buttons: + - * / ^. User can click a button and the application count the right result and shows it in a textbox.

In the C# scripts version use only a editor and create one webpage named as calculator.aspx

In the webform version use VisualStudio.NET and use field validator to validate that content of texboxes is valid before the application counts the result.

Simple authentication for website model "hardcoded"  

Create a simple ASP.NET application where an enduser has to authenticate before he or she can continue. So there must be three webpages:

  1. a welcome page where everybody can come and there is button where an enduser can start to login.
  2. an login page, where is textboxes for name and password,
    name and password are stored in application level variables,
    username "student" and password "tneduts" is only valid combinatoin to access
  3. a secure page for authenticated user,
    the page also shows following information: username, time of login and Unique sessionID

Authentication in website from database

Create a ASP.NET application where an enduser has to authenticate before he or she can continue. So there must be at least four webpages:

  1. a welcome page where everybody can come and there is button where an enduser can authenticate.
  2. an authenticate page, where is textboxes for name and password, name and password are in db
  3. a secure page for authenticated user, the page also shows information of user (read from db) and a button or link where to user can go to a change data page.
  4. (optional) a page where an authenticated user can view and change his/her data in database

 

Back