Programming With C# Lab 1 (Week 1, 2) : (Program Description)
Programming With C# Lab 1 (Week 1, 2) : (Program Description)
Lab 1 (week 1, 2)
=====================================================================
Read the following program description, then create a console application in C#.
[Program Description]
The program allows the user to register member, item type, and place item for auction (it is a
part of auction system described in document List of sample projects). Your program must
check the data entered by the user and if it is wrong, it must ask them to enter again.
Your program output may be look like as below:
Lab1: Nguyen Tuan Anh, SE0903
1. Register a member
2. Register an item type
3. Place item for auction
4. Exit
Please enter 1, 2, 3, or 4:
1) If the user enter 1, the program will allow the user to register a new member (member ID
is unique and generated by the system) , then display the list of members as below:
Enter Member name: Nguyen Van A
Enter Address:
Enter Email address: [email protected]
Enter Expiration date (dd:MM:yyyy): 12:24:2015
Format date must be dd:MM:yyyy!
Enter Expiration date (dd:MM:yyyy): 24:12:2015
List of members:
ID
Name
Email address
Page 1
Expiration date
1
2
3
4
Nguyen
Nguyen
Nguyen
Nguyen
Van
Van
Van
Van
A
B
C
D
[email protected]
[email protected]
[email protected]
[email protected]
24:12:2015
24:12:2015
24:12:2015
24:12:2015
2) If the user enter 2, the program will allow the user to register a new item type (item type
ID is unique and generated by the system), then display the list of item types as below:
Enter Item type name: Laptop
List of item types:
Item type code
1
3) If the user enter 3, the program will allow the user to place item for auction (item ID is
unique and generated by the system), then display the list of all items placed for auction as
below:
Enter Seller ID: 5
Member ID 5 doesnt exist!
Enter Seller ID: 1
Name: Nguyen Van A
Enter Item type ID: 10
Item type ID 10 doesnt exist!
Enter Item type ID: 1
Item type name: Laptop
Enter Item name: Dell 1300
Enter Item description:
Enter Minimum bid increment (USD): 10h
Must be a double!
Enter Minimum bid increment (USD): 10
Enter End date time (dd:MM:yyyy,HH:mm): 10:04:2015,10:65
Format date time must be dd:MM:yyyy,HH:mm!
Enter End date time (dd:MM:yyyy,HH:mm): 10:04:2015,10:00
List of items:
Seller
Item type
Item name
Minimum incr.
Dell 1300
10
10:04:2015,10:00
Dell 1200
10
10:04:2015,10:00
[Note]
Page 2