Unit 21 Event Driven Programming Solutions-Btechnd
AC3.1 Implement an event driven solution based on the designed you prepared for club.
Implementation of Event Driven Programming Solution: After designing the interfaces we have implemented the event driven solution for our design. We have written event driven solution in Visual Basic (VB.Net).
Our Event driven solution uses control structures to determine part of code to execute.
First of all application displays a login dialog to the user. Here user can logged in the application.
After login user can perform tasks. All application tasks can be performed via event driven menus.
Application screens for event driven menus are as follows:
Management Menu: This menu is used to manage presenters and users of the application.
Results Menu: This menu is used to manage results of a presenter. This menu is also used to view certificates of any presenter.
(Figure: Results Menu)
By using these event driven menus users of this application can perform their tasks.
AC3.2 Implement event handling using appropriate control structures to meet the design algorithms provided.
Implementation of Event Handling: By using event driven menus user can access all parts of the application. All features of the application can be accessed via these menus.
All other features of the application can accessed using different event driven forms. These event driven forms provide user interface of the application and provide event based functionality as well.
Some event driven forms for the application are as follows:
(Figure: Login Form)
Delete Presenter Form
(Figure: Delete Presenter Form)
Add User Form
(Figure: Add User Form)
Delete User form:
(Figure: Delete User Form)
Add Presentation Form
(Figure Add Presentation Form)
Schedule Presentation Form
(Figure: Schedule Presentation Form)
AC3.3 Identify and implement opportunities for error handling and reporting for the event driven solution to the club problem.
Identification of Error Opportunities and Handling them: All users perform their tasks via event driven forms. These forms display visual interface for user input and process input data entered by the user. We encountered many input and logical errors.
While development process we have encountered following errors and have provided implementation for solving them.
Empty values on login screen: First error which we have encountered was at login screen. Here user provides his username, password and role. Login functionality was working well if user provides proper values. But if user leave form fields blank and try to login then application was generating an error in the background. To provide proper functionality our application must notify users about invalid input. So we check for empty values at login time if it found application will display a message box to the user.
(Figure: Message box for blank values at login screen)
Invalid User Name: At login screen if user specify an invalid username and password, the application denies the login request. Previously application was displaying login message on the console. This console message was irrelevant to the desktop application user. Now I have update the application to display a message box for invalid username and password.
Error checking for invalid UserName: While adding a new presenter, administrator has to specify his login details. Login username for all users must be unique for login functionality. If any specified username already exists application displays a message box to notify users that username already exists.
Date check while scheduling presentations: As per the assignment, while scheduling presentations, next presentation date can only be scheduled after two weeks of previous presentation. We have checked all possibilities of errors for applying this constraint.
(Figure: Date Schedule Message while scheduling presentations)
Maximum Allowed Presentations: As per the assignment, any presenter can give only four presentations. We have checked all error possibility for adding more than four presentations for a presenter.
(Figure: Error message while adding more than four presentations)
AC3.4 Make effective use of an Integrated Development Environment (IDE) including code and screen templates when solving the problem for the club.
Design of application using IDE with Screen Templates: We have used all features of the Integrated Development Environment (IDE) provided by the visual studio.
Interface Builder of visual studio is used to design all visual interface for the application. Interface Builder provide drag and drop functionality to create user interface.
Auto Event Binding is used to bind event handlers with the form controls.
IntelliSense and Code Completion feature of visual studio is helped us to write control structures for event driven programming.
Interface designed with the help of visual studio IDE is as follows:
Add User Screen:
Presentation Dates Screen:
Add Marks Screen:
M2 Your report must include range of methods updating your system.
Methods for updating the system: We have added functionality to edit and delete information for the user and presenter. Admin can perform update and delete operations on the data of presenters and their scheduling information.Order Now
Following forms provide update and delete functionality:
Form for presenter information edit:
(Figure: Edit Presenter form)
Form for presenter entry delete:
(Figure: Update User Form)
User entry delete form:
(Figure: Presentation schedule for Add, Edit and Remove)
(Figure: Delete Presentation date)