讲解Payment program、辅导C#编程语言、辅导C#留学生、讲解Visual Studio
- 首页 >> C/C++编程Assignment 2
10% out of 100 marks
Due Date: Sunday 4th October 2015 (9:00pm)
Assignment 2 consists of 2 parts.
Part A: worth 5%, requires you to include code within the Plan Payment program to write the array
of customer data to a file called customer.txt and read the customer.txt into program if requested by
the user.
Part B: worth 5%, design a user interface that could be used to control the functions of the Plan
Payment program.
Part A: Description
Create a new C# console application project in Visual Studio and name the project ass2-partA
Using the solution provided to Assignment 1 or your solution for Assignment 1, include two new
options in the menu that perform the following:
Save data to file (s) : when chosen, open a file called customer.txt and write the data for all
customers entered to the file. E.g,:
Full Name, Address, Reference, Plan
John Smith,12 Albert Ave - Burwood - VIC 3125,0411222111,M
Frank Jones,1/25 Dove Street - Springvale - VIC 3172, 0411333123,S
Each customer’s data should be written to the file on a newline and all data is comma separated.
Load data from file (l): when chosen, open the file called customer.txt and read the following data
for all customers contained within the file into the customer’s details arrays. E.g,:
Full Name, Address, Reference, Plan
John Smith,12 Albert Ave - Burwood - VIC 3125,0411222111,M
Frank Jones,1/25 Dove Street - Springvale - VIC 3172, 0411333123,S
Each customer’s data is read from the file one line at a time, split into the individual elements using
the comma separator, validate to make sure the correct data will be stored into the arrays, and
update current and last record position.
NOTES: Ensure you provide the following error checking to void the program does not crash.
Check the files can be opened.
Check you can read or write to the file.
Ensure you do not read in more than the 50 customers allowed.
Part B: Description
Create a new C# Windows Forms project in Visual Studio and name the project ass2_partB.
Develop an interface that could be used to move the console Plan Payment program into a Windows
Forms Program.
You may use any type of control available and you may explore all types of layout.
An example of your interface could be as follows:
You do not have to incorporate any of the existing Plan Payment code into the Windows Forms
application.
Note: It is just the interface and no actions or events are required.
Place the relevant controls and labels on the form.
Name each control with an appropriate property name.
E.g., The Full Name Text Box could be called FullNameTxt rather than TextBox1, TextBox2, etc.
You do not have to place default data in the control but you may if you wish.
Marks will be allocated as follows:
50 marks for the reading and writing the data.
28 marks for reading.
12 marks for writing.
10 mark for adding the menu items and switch items.
50 marks for the creation of a user interface.
10 marks for providing a control for each Customer data items
15 marks for providing a control to manage the Payment data items
25 marks for providing a control to manage the Estimated Data Usages items
Submission instructions:
Zip up both part A and part B project folders and all files and folder within.
Part A: Name the zip file sit102-Ass2-partA-<Student Number>.zip where <Student Number> is
replaced with your student number. E.g., sit102-Ass2-partA-323978.zip
Part B: Name the zip file sit102-Ass2-partB-<Student Number>.zip where <Student Number> is
replaced with your student number. E.g., sit102-Ass2-partB-323978.zip
Submit two zip files via the Assignment 2 submission tool in the Assessments folder in the unit web
page.