C#辅导 | Faculty of Engineering and Information Technology
Assignment 2 – Spring 2019 Page 1 of 6
Faculty of Engineering and Information Technology
School of Software
31927 – Applications Development with .NET
32998 – .NET Applications Development
DUE DATE – Monday, 14th October 2019
DEMONSTRATIONS – Labs of Week 12
This assignment is worth 35% of the total marks for this subject.
This assessment requires you to develop a simple text editor with a basic offline user login. It is a
windows application that will allow new uses to be added, existing users to login, and to
create/save/edit text documents. The text documents can be either viewed or modified/created
based on the user type. This will be a prototype of a text editor which will provide an overview of
the basic underlying programming techniques required to create windows applications and text
The purpose of this assignment is to demonstrate competence in the following skills.
Windows form and controls
Communication between multiple windows forms
Enumerators and properties.
Text file reading and writing
Assignment 2 – Spring 2019 Page 2 of 6
Each box is a separate screen which shows the visual elements that should be present. The direction of arrows
specify the direction of flow between screens. The text in each box describes some of the components that
should be in the screen, though you are free to add more if you feel they are needed / appropriate.
(Depends on user type)
Username (text box)
Password (text box)
“New User” (button)
New User Screen
Username (text box)
Password (text box)
Re-Enter Password (text box)
First Name (text box)
Last Name (text box)
Date of Birth (DatePicker)
User-Type (Combo Box)
or incorrect password)
“New User” clicked
Text Editor Window
A. Menu items required (MenuStrip): (Example shown below):
d. Save As
The menu item should show the icons along with text.
B. Top Tool Strip (ToolStrip): (Example shown below):
The top tool strip should be placed below the menu. The first group of 4 buttons are for new, open, save,
and save-as operations, along with a separator. The second group of 3 buttons are for text formatting,
bold, italics, and underline. The ComboBox will be used to select the font size, to resize the selected text.
The buttons should show the respective icons. Appropriate tool tip text should be added to each button.
The tool strip Label shows the name of the currently logged user.
C. Left Tool Strip (ToolStrip): (Example Shown below):
D. The Text editting area (RichTextbox):
A RichTextBox control should be added to the form and should be used for text editing. Use the
RichTextBox properties as requried to achieve the functionalities.
The tool strip should be placed in the left side on the window, below the top tool
strip. It has 3 buttons, to edit text, such as, copy, paste and cut functionality, which
can be applied to selected text.
Assignment 2 – Spring 2019 Page 3 of 6
In order to test core C# principles and windows programming skills, the following are required. Any additional
functionality should be designed and added as needed.
1. Create appropriate class and methods for handling user login information.
a. User information/details are stored in a text file named “login.txt” in the following format
(each value is separated by a comma):
Username, Password, User_Type, First_Name, Last_Name, dd-mm-yyyy(Date-of-birth)
b. Use of appropriate collection/data structure is required for storing the user information from
the “login.txt” file.
c. The class should have appropriate variables to:
i. Track the currently logged user and their user type
ii. Accessors for each of the variables.
d. The class should have methods to:
i. Load all users from the “login.txt” file into an appropriate data structure.
ii. Save all users back to “login.txt”, when a user logs out of the text editor.
iii. Checking if a user name and password provided by the user is valid.
iv. The type of user describes whether a user is allowed to edit any file. There are two
type of users:
– “View”: The user can only view any text file. Text editing is disabled in the
text editor window.
– “Edit”: The user can create/edit any text file. 2. Login Form:
a. This is first screen displayed when the program is launched
b. All the user information from “login.txt” should be loaded into appropriate data
c. When login button is pressed, the username and password in the textbox are checked with
all the available user information. If the login is successful, the text editor form/window is
displayed. In case of unsuccessful login, appropriate message is shown using MessageBox()
and the login windows remains open.
d. When Exit button is pressed, the application is closed.
e. When New User button is pressed, the New user window/form is displayed and hides the
3. New User Form:
a. A user is allowed to enter the required information.
b. When submit button is pressed, the information is added to the data structure/collection,
and all information is saved back into the “login.txt” file.
c. When cancel button is pressed, the Login form is display and hides the New user form.
4. Text Editor Window:
a. Appropriate common dialog boxes should be used to implement the open, save and save as
functionality available in the menu strip under File menu and also the respective tool strip
b. Open menu will allow to select a text file and load all the text from the file into the
c. Save and Save as, will save all the text line in the RichTextBox into an .rtf file.
d. The Bold, Italic and UnderLine buttons on the top ToolStrip are used change the selected
text style to bold, Italic or UnderLine.
e. The ComboBox on the top ToolStrip shows the font size from 8 to 20, and is used to change
the size of the selected text in the RichTextBox.
f. The Cut, Copy and Paste buttons on the left ToolStrip and Edit Menu are used to
cut/copy/paste selected text in the RichTextBox.
g. The About form should be used to implement the About menu item under Help.
Assignment 2 – Spring 2019 Page 4 of 6
h. On clicking Logout option from the File Menu, the text editor window should close and the
Login window should be displayed.
i. The RichTectBox should be disabled or enabled for editing based on the user type.
5. About Window:
a. Should display appropriate information about your text editor, such as name, version
b. On clicking OK button, the About form should close.
Below is the marking guide for this assessment. It is designed to allow you to get a Pass grade with minimal
effort while still demonstrating that you understand the core principles of .NET development, to get a
Distinction with reasonable effort, and to get a High Distinction with solid effort, and 100% with considerable
effort. It is recommended that you pay attention to the grade distribution and work towards your own skill
In the demos in the lab, your code needs to be compiled in Visual Studio and then the tutor will test for
normal functionality as described in the descriptions above. If your code does not compile you will receive
zero marks. You need to demonstrate that you understand the functionality of various components in a
Windows form and your forms should be easily readable and usable by your tutor.
Task Items Max
Grade (Assuming full
points above this item)
Includes high cohesion and low coupling for
classes and methods, using properties, using
enumerations, collections where appropriate, etc.
Includes proper indenting and white spacing, helpful
comments and meaningful
Includes form/window designs, with basic transition
between forms/windows on button clicks or as
– Login: 2 marks
– New User: 3 marks
– Text Editor: 6 marks
– About: 1 mark
(in order of
e.g. start with items
higher on the list)
Text Editor Window – Required Classes, Methods,
and Member Variables are correctly implemented,
in order to achieve the overall functionality of a
simple text editor and code compiles without error.
– All File menu options implemented: 4 marks
– All Edit menu options and buttons: 2 marks
– All text editing buttons (bold, italics, etc): 4 marks
Login screen working correctly by reading from and
writing to login.txt file instead of a hardcoded User
Login Screen – successful login and failed login with
sample User details are hard coded and appropriate
data structure used.
New User Screen – successfully add new user and
allow that user to then login 2 100%
Assignment 2 – Spring 2019 Page 5 of 6
Submission of your assignment is in two parts. You must upload a zip file of the C# solution to UTS
Online. This must be done by the Due Date. You may submit as many times as you like until the due
date. The final submission you make is the one that will be marked. If you have not uploaded your
zip file within 7 days of the Due Date, or it cannot be compiled and run in the lab, then your
assignment will receive a zeromark
NOTE 1: It is your responsibility to make sure you have thoroughly tested your program to
make sure it is working correctly.
NOTE 2: Your final submission to UTS Online is the one that is marked. It does not matter if
earlier submissions were working; they will be ignored. Download your submission from
UTS Online and test it thoroughly in your assigned laboratory.
If you have a problem such as illness which will affect your assignment submission contact
the subject coordinator as soon as possible.
Dr. Nabin Sharma
Phone: 9514 1835
If you have a question about the assignment, please post it to the UTS Online forum for
this subject so that everyone can see the response.
If serious problems are discovered the class will be informed via an announcement on UTS
Online. It is your responsibility to make sure you frequently check UTS Online.
PLEASE NOTE 1: If the answer to your questions can be found directly in any of the
UTS Online FAQ
UTS Online discussion board
You will be directed to these locations rather than given a direct answer.
Assignment 2 – Spring 2019 Page 6 of 6
It is possible that errors or ambiguities may be found in the assignment specification. If so,
updates will be placed on UTS Online and announcements made regarding the amendment.
It is your responsibility to keep up to date on such amendments and ensure you are using
the latest version of the Assignment Specification.
Acceptable Practice vs Academic Malpractice
Students should be aware that there is no group work within this subject. All work must be
individual. However, it is considered acceptable practice to adapt code examples found in the
lecture notes, labs and the text book for the assignment. Code adapted from any other
source, particularly the Internet and other student assignments, will be considered academic
malpractice. The point of the assignment is to demonstrate your understanding of the
subject material covered. It’s not about being able to find solutions on the Internet.
Participants are reminded of the principles laid down in the “Statement of Good Practice
and Ethics in Informal Assessment” in the Faculty Handbook. Assignments in this subject
should be your own original work. Any collaboration with another participant should be
limited to those matters described in the “Acceptable Behaviour” section. Any infringement
by a participant will be considered a breach of discipline and will be dealt with in accordance
with the Rules and By-Laws the University. The Faculty penalty for proven misconduct of this
nature is zero marks for the subject. For more information, see
Extensions and Special Consideration
In alignment with Faculty policies, assignments that are submitted after the Due Date will lose
10% of the received grade for each day, or part thereof, that the assignment is late. Assignments
will not be accepted after 5 days after the Due Date.
When, due to extenuating circumstances, you are unable to submit or present an assessment task
on time, please contact your subject coordinator before the assessment task is due to discuss an
extension. Extensions may be granted up to a maximum of 5 days (120 hours). In all cases you
should have extensions confirmed in writing.
If you believe your performance in an assessment item or exam has been adversely affected by
circumstances beyond your control, such as a serious illness, loss or bereavement, hardship,
trauma, or exceptional employment demands, you may be eligible to apply for Special
Consideration (https://www.uts.edu.au/current-students/managing-your-course/classes-andassessment/special-circumstances/special) .
Return of Assessed Assignment
It is expected that marks will be made available 2 weeks after the demonstration via UTS
Online. You will also be given a copy of the marking sheet showing a breakdown of the marks.