Unit 20 Event Driven Programming Solutions Assignment

Event Driven Programming Solutions Assignment

Unit 20 Event Driven Programming Solutions Assignment

Programme

Diploma in Computing

Unit Number and Title

Unit 20 Event Driven Programming Solutions

QFC Level

Level 4

Unit Code

H/601/0453

unit 20 event driven programming

Task-1

AC1.1 Submit a report to the club president clearly explaining the principles, characteristics and features of event driven programming.

Principles of Event Driven Programming: Event-driven programming is a programming approach in which events decide the flow of program execution. For example when a user performs a mouse click, press a key on keyboard or interact with the system with any other input method.
An event-driven web application detect events as they occur and then call appropriate event-handling procedures to generate the results desired by the user.
The previous era of programming uses interrupt-driven programming to generate results on command-line environments such as DOS or embedded systems (where the application is implemented as firmware).
Event-driven programs can be written in any programming language, but Visual Basic is specifically designed to facilitate event-driven programming. It also provide an integrated development environment (IDE) {Visual Studio} which helps developers in writing code and provide variety of built-in objects and controls.
Characteristics of Event Driven Programming:

  • Best for Graphical User Interface: Event driven programming in best technique for GUI applications, because in GUI applications user interacts with the system using events (Mouse Click, Key Press etc.).
  • Event driven programming can also be used with procedural languages where all event handling can be defined as separate procedures.
  • Service Oriented: In event driven programming many of our event handlers are service oriented. Service oriented event handlers works as background services and serve users silently in the background.
  • Time Driven: In event driven programming we can define time driven event handler. Time driven event handler execute automatically after a specific time interval.

Features of Event Driven Programming:

  • Flexibility: Event driven programming is very flexible and a wide range of applications can be created using event driven programming.
  • Suitable for graphical interfaces: Event driven programming is very suitable for graphical interfaces because in GUI application user interact with the system via events.
  • Simplicity of programming: Event driven programming is very simple compare to traditional flow driven languages.
  • Ease of development: Event driven programming provide easy development environment for programmer because he/she only need to concentrate only on one event a time.

M3 Present and communicate appropriate finding in a standard technical format when submitting this report to the club president.
Report for club president:
After a thorough study of application requirements for “The Creative Computing Club”, we found that, we have to develop a GUI based application for the club. This application provide functionality for three kind of user.

  • Organizer: Organizer can perform administrative tasks.
  • Presenter: Presenter is an authorized member to give a presentations.
  • Audience: General viewer of a presentation. These provide score for each presentation held at the club.

To develop such application we have to select a programming paradigm which is best for current application. There are many programming styles for application development such as procedural programming, event driven programming and object oriented programming etc.
After deep study of each programming paradigm we decided that Event driven programming will be the perfect solution for the application. Event driven programming is suitable for such applications which performs actions based on user actions (events).
Since proposed application is a GUI application and it performs tasks according to the user actions. Event driven programming is best choice for the application.
To develop an event driven programming solution we have to define an event scheduler which receives all events and pass the control to event specific handler.

 unit 20 image1

        Technologies to be used for the application:

  1. Programming Approach : Event Driven Programming
  2. Programming Language : VB.NET
  3. To store application data : Microsoft SQL Database Server

Task-2

AC2.1 Design an event driven programming solution based on the specification given by Creative Computing Club.

Proposed design of the application using event driven programming
Since we are developing an application for Creative Computing Club we prepared user interface design for our application.
Our design in visual studio is as follows:

Design of login screen:

unit 20 event driven

Presenter Details Form:
image3
                     (Figure : Presenter Details Form)

  1. Schedule Presentation Form:
    image4
                     (Figure : Schedule Presentation)
  2. Certificate Design:
    unit 20 image5
                                   (Figure : Certificate Design)
  3. View all Presenter Certificates:
    unit 20 image6
                             (Figure : View All Presenter Certificates Form)

AC2.2 Identify the screen components and data file structures required to implement the design provided for the Creative Computing Club problem specification.

Visual Studio Screen Components:

1.Complete interface of visual studio

unit 20 image6
                                       (Figure: Visual Studio Complete interface)
2.Solution Explorer: It provides functionality to manage all project files. It shows a tree structure which enables users to add, delete or rename files to their projects.
unit 20 image7
                       (Figure : Solution Explorer)
3.Editor Area: This is the main working area for the user. It provides two interfaces Design and Code.
In Design interface user can see application’s running time interface. He can add or adjust other components using mouse.
In Code interface application shows application code to the user.
unit 20 event driven programming
                                     (Figure : Editor Area)
4.Toolbox: Toolbox area provides screen controls for the application. It is very useful with Design Interface of Editor Area. User can drag controls from here and add them directly to the application interface.

unit 20 event
           (Figure: Toolbox)
5.Toolbar: It provides few useful shortcuts to work with visual studio, like opening new project, save project, run project, debug project etc.
unit 20 event driven
                                                                  (Figure: Toolbar)

M2 Identify and apply strategies to find appropriate design solutions to your application. Include all design documentations listed in briefing note for Task2.
Strategies for designing the application (User Use Case & Application Flow diagrams)
During the study phase of the application we have found that there are three types of users in the application:

  1. Administrator
  2. Clerk (User)
  3. Presenter

Following diagram shows tasks of these users in the application.

unit 20 event image

                                                         (Figure: User Case Diagram for all users of the application)

After defining the tasks for each user we have designed the flow of application. This application flow describes how modules of our application work together to achieve a specific goal.

unit 20 event driven image

                                               (Figure: Application Flow Diagram)

Take responsibility for managing and organizing all the activities in your project. Refer to briefing note for Task 2
Project Plan: After deep study of the application we have defined user roles and application flow between modules we are now assured that this application is feasible and we it fulfill all tasks as stated in assignment.
We have made a project plan, which defines various phases of our application development and estimated time for each phase.
Following figure represents our project plan:

unit 20 event image driven

                                                          (Figure: Project Plan)

Contact us

Get assignment help from full time dedicated experts of Locus assignments.

Call us: +44 – 7497 786 317
Email: support@locusassignments.com
 
BTEC HND Assignment Experts

Task-3

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.

unit 20 event image
Results Menu: This menu is used to manage results of a presenter. This menu is also used to view certificates of any presenter.

unit 20 event driven programming
                      (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:

Login Form:

image login

                                                                   (Figure: Login Form)

Delete Presenter Form

unit 20 event image

                                              (Figure: Delete Presenter Form)

Add User Form

unit 20 event driven
                                                               (Figure: Add User Form)

Delete User form:

unit 20 event delete
                                                         (Figure: Delete User Form)

Add Presentation Form

unit 20 image20
                                                         (Figure Add Presentation Form)

Schedule Presentation Form

unit 20 event driven
                          (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.
unit 20 image event driven
        (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.


unit 20 
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.
unit 20 image
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.
unit 20 image26
        (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.
unit 20 image27
(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:

Login Form:

unit 20 image29

Presenter Screen:

unit 20 image29

Add User Screen:

unit 20 image30

Presentation Dates Screen:

unit 20 image 31

Add Marks Screen:

unit 20 event driven image

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.
Following forms provide update and delete functionality:
Form for presenter information edit:

unit 20 image33

                                                        (Figure: Edit Presenter form)

Form for presenter entry delete:

unit 20 image34
                                            (Figure: Update User Form)

User entry delete form:

unit 20 image event
 

                              (Figure: Presentation schedule for Add, Edit and Remove)

unit 20 image
                   (Figure: Delete Presentation date)

Task-4

AC4.1 Critically review and test an event driven programming solution provided

Critical Review and Test of developed Event Driven Programming: After developing the proposed event driven programming solution for the application we have reviewed all form for expected results.
Our review report are as follows:
Login Form: Login form is displaying as splash screen at application startup. All users must have passed through through login form to use the application. After reviewing the login form we found that all event handlers are working fine for the login form.
Presenter Form: Presenter from is used to add a presenter user in the application. Here user can register new presenter, edit existing presenter and delete existing presenter. After reviewing the presenter form we found that all event handlers are working fine for the form.
User Form: User form is used to add new user (Clerk) in the application. Here user can register new presenter, edit existing presenter and delete existing presenter. After reviewing the presenter form we found that all event handlers are working for the form.
Presentation Dates Form: Presentation dates form is use to add presentation dates for the club. It is used to set schedule of presentations with dates. It provides functionality to add, edit and remove presentation dates. It is also displaying a list of all presentation dates scheduled for presentations. After review we found that all event handlers are working for the form.
Presentation Schedule Form: This form provides functionality to schedule presentation dates for a presenter. This form provides a list box (List of presentation dates) using which presentation schedule of a presenter can be specified. User can only set four presentation dates for a particular presenter. After review we found that all event handlers are working for the form.
Add Marks Form: This form provides functionality to add marks for all presentations of a presenter. As per the assignment instructions we have provided 4 scores for each presenter and entered marks can’t be more than 25. After review we found that all event handler and error checking are working for form.

AC4.2 Analyze actual test results against expected results to identify discrepancies in implementation.

Analysis of actual test results against expected results
After critical review and test of event driven functionality we have made some test cases to be sure that all major buttons are working properly or not.
After these test cases we can be sure that our application can handle all input errors and can produce effective output.
We have made following test cases for the application:

S.N.

Testing Criteria

Expected Result

Actual result

1

Login Button Check on Login screen

1. Display error message for invalid login

2. If username and password is valid then logged-in user into the application.

1. Displaying message on invalid data or invalid username and passwords.

2. If username and password is valid then providing access of the application to the user.

2

Register Button on presenter form

Display Register Presenter dialog to the user.

It is displaying Register presenter dialog to the user

3

Edit button on presenter form.

Provide editable access to the user for selected presenter.

It is providing editable access to the user for selected presenter.

4

Delete Button on presenter form

Delete selected presenter.

It is deleting selected presenter

5

Add, Edit and Remove Button on Users Form

1. Add button displays add user screen.

2. Edit Button provides editable access for selected user.

3. Remove Button removes selected user.

1. It is displaying add user screen.

2. Providing editable access to selected user.

3. Removing selected user.

6

Schedule Presentation Form

Provide functionality for selection of at most 4 presentation dates.

Providing functionality for selection of at most 4 presentation dates.

                                 

AC4.3 Evaluate independent feedback on the developed event driven program solution for the club and make recommendations for improvements

Feedback and Recommendation:  During the evaluation of this application is thoroughly tested and executed for various input and test cases. After evaluation we found that all of its features are according to the criteria given in the assignment and all features are working properly.
There is some minor suggestions from our tutor regarding form validation, I have corrected that after it there was no negative feedback.

AC4.4 Create onscreen help to assist the users of the computer program you created for the club.

User Documentation: Here is the step-by-step instructions for using the application:

  • On application startup login form is displayed to the user:

unit 20 image event
                      (Figure: Login Interface)
Here user can login in the application. While login user must specify his role (User Type).

  • Interface after login: Following interface is displayed to the user after login.

unit 20
                            (Figure: Interface after login)

  • Menus of the application: Application can be used via event driven menus. Application menus are as follows:

         Manage Menu: It provides all management tasks for the application.
unit 20 event driven assignment
Presentations Menu: It provides all tasks related to the presentations.
unit 20 event assignment
Results Menu: It provides options for managing and display of marks of presenters.
unit 20 event assignment

  • How to add, edit and delete presenters: To manage presenters please select “Presenters” option in “Manage” menu.

unit 20 image 40 

Here click on register button to register new presenter.

To edit an existing user select username form the left hand side list and click on “Edit” button.
unit 20 event driven solution

To delete a presenter select username from left hand side list and click on “delete” button.
unit 20 image 44

  • How to add, edit and delete users of the application: To add, edit and delete users of the application please select “Users” option in “Manage” menu.

Application displays a form to add/edit/delete users.
Click on “Add” button to add new user.
unit 20 image 45

To edit an existing user select his name from left hand side list and click on “Edit” button.
unit 20 image 46

To Delete the user select username from left hand side list and click on “Delete” button.
unit 20 image 47

  • To schedule presentations first of all we have to add presentation dates. To add presentation dates select “Presentation Dates” option from “Presentation” menu.

Following dialog is displayed to the user.
unit 20 image 47
Here user can “Add”, “Edit” or “Remove” presentation dates.

  • To schedule presentation dates for a presenter, please select “Presentation Sessions” from “Presentation” menu.

Following dialog is displayed to the user.

unit 20 image 49 
Here user can select presenter name from a drop down list and select his presentation dates.
User can select at most 4 presentation dates for a presenter.

  • To view schedule of a particular presenter select “View Schedule” option from “Presentation” menu.

Following form is displayed to the user:
unit 20 event driven
Here user can view schedule of any presenter by selecting presenter name from drop down list.

  • To add /update marks of a presenter please click on “Manage Marks” option from marks menu.

Following form is displayed to the user:
unit 20 image 51
Here marks of any presenter can be added or updated. Presenters can be selected from top drop down list.

  • To view results click on “View Results” option from “Marks” menu.

Following form is displayed to the user:
unit 20 image 53
here marks of any presenter can be viewed by selecting presenter name from drop down list.

  • To view a list of all certificates click on “View Certificates” option from “Marks” menu.

Following dialog is displayed to the user:
unit 20 image 53 

Here a list of all certificates will be displayed to the user. User can also filter certificates by category (Gold, Bronze and Silver) from drop down list.
D1. Discuss why certain events are more suited for activating certain functions than others and provide 3 examples of specific events you will use for specific functions related to the case study.

Function specific events

We have applied event driven programming on every module of this application. We have used several events to provide just in time validation (Validate values while receiving input).
We have used just in time validation in Add Marks form.
As per assignment instructions we have following constraints while adding marks

  • Marks can’t  be more than 25 per session.
  • Marks must only be numeric values.

We have applied TextChange Event on the form fields to validate user input data while receiving input values.
We have displayed Message Boxes to notify users for invalid values.
Error Message when presentation marks are greater than 25.
 unit 20 image 54

Error Message for invalid value such as a sting.
unit 20 image 55

D3. Produce a self evaluation on what went well or wrong with this assignment and how you did resolved problems in your programming You must also explain how you would develop the application further if you had more time and resources available

Self Evaluation: While developing this project we have faced minor problems in data validation and user authentication and event driven programming. But all of these problems are solved with the help of our tutor and reference books.
We can further develop this application with more enhanced visual features like option to add image for all presenters, their poster for presentation and use of icons in the application menus and button if we have more time.

Need help?

Get Complete Solution From Best Locus Assignment Experts.

Place an order

References:

Event driven programming [Online]. [Accessed on 6 January 2015]. Available on world wide web: <http://en.wikipedia.org/wiki/Event-driven_programming>
Event
driven programming [Online]. [Accessed on 5 January 2015]. Available on world wide web: <http://www.technologyuk.net/computing/software_development/event_driven_programming.shtml>
Key features of
event driven programming [Online]. [Accessed on 7 January 2015]. Available on world wide web: <http://reece-burrows-media.blogspot.in/2013/11/key-features-of-event-driven-programming.html>
Event
driven programming [Online]. [Accessed on 6 January 2015]. Available on world wide web: <http://c2.com/cgi/wiki?EventDrivenProgramming>
Getting Started with Visual Basic [Online]. [Accessed
on 5 January 2015]. Available on world wide web: <http://msdn.microsoft.com/en-us/library/dd492171.aspx>
Microsoft Visual Studio 2013 Tutorials [Online]. [Accessed
on 7 January 2015]. Available on world wide web: <https://www.youtube.com/watch?v=uV1ck35qiG8>
VB .Net Tutorials [Online]. [Accessed
on 5 January 2015]. Available on world wide web: <http://www.tutorialspoint.com/vb.net/>
VB .Net – How to start programming [Online]. [Accessed
on 6 January 2015]. Available on world wide web: <http://howtostartprogramming.com/vb-net/>
Use Case Diagram [Online]. [Accessed
on 7 January 2015]. Available on world wide web: <http://en.wikipedia.org/wiki/Use_Case_Diagram>