Docsity

ASM PROG 191: javascript programing PASS, Study notes of Javascript programming

Toggle sidebar
bg1
Page | 1
Higher National in Computing
ASSIGNMENT 1
Name: Dong Sy Nhat Thanh
ID: GCS210033
Class: GCS1003A
Subject code: PROG191
Assignment due: Assignment submitted:
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download ASM PROG 191: javascript programing PASS and more Study notes Javascript programming in PDF only on Docsity!

Higher National in Computing

ASSIGNMENT 1

Name: Dong Sy Nhat Thanh

ID: GCS

Class: GCS1003A

Subject code: PROG

Assignment due: Assignment submitted:

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title

Submission date Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Student ID

Class Assessor name

Student declaration

I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that

making a false declaration is a form of malpractice.

Student’s signature

Grading grid

Grade (0-10)

Assignment Brief

Student Name/ID Number Unit Number and Title Object Oriented Programming with Java Academic Year 2020 - 2021 Unit Tutor Assignment Number & Title Design, Implement and Test a GUI application Issue Date Submission Date IV Name & Date Submission Format The submission is in the form of a written report. This should be written in a concise, formal business style using single spacing and font size 12. You are required to make use of headings, paragraphs and subsections as appropriate, and all work must be supported with research and referenced using the Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. Unit Learning Outcomes LO1 Understand basic programming skills and OOP paradigm LO2 Understand how to detect errors and handle errors LO3 Understand how to working with files in applications LO4 Understand how to build GUI application Assignment Brief You have to develop an application to solve a small business problem. The problem requires a graphical user interface with features that required reading / writing data from text file, working with a collection of data (searching for item / min / max / sum / etc.). The application must handle errors so that it will not crash at end user side. The application also need to be fully tested before the production phase. You need to write a technical report about the development of the application. Content of the report should cover design, implementation and testing. In the end you need to demo your application, explain your code and answer technical questions.

Learning Outcomes and Assessment Criteria LO1 Understand basic programming skills and OOP paradigm LO2 Understand how to detect errors and handle errors LO3 Understand how to working with files in applications LO4 Understand how to build GUI application To get Pass (5 – 6.5 points)

  • Student can design and implement GUI for the application solve a specific problem
  • Student knows how to load and save data from file.
  • Student knows how to handle errors by using exceptions
  • Student knows how to write test plan, execute test cases and log results. To get Merit ( 7 – 8.5 points )
  • The application is well designed, user friendly and has logical flow of actions.
  • Can apply MVC in the application, can apply JUnit to test automatic
  • Errors are well handle to avoid program crashing, the test can cover as many as possible the errors in program To get Distinction (9 – 10 points) The application must show excellent design & implementation, runs without any errors, all inputs are validated, all errors are well handled including recover choice, rich features showing unique ideas, algorithms.
    1. Introduction
    1. Requirement
    1. UI design
    1. Implementation
    • 4.1. Explain program structure
    • 4.2. Explain classes.
    • 4.3. Several screenshots of the application when it runs
    1. Test
    1. Conclusion
  • References
  • Figure 1: Eclipse Table of figures:
  • Figure 2: Wireframe
  • Figure 3: Code
  • Figure 4: Code
  • Figure 5: Code
  • Figure 6: Code
  • Figure 7: Code
  • Figure 8: Code
  • Figure 9: Code
  • Figure 10: App Interface
  • Figure 11: App Interface
  • Figure 12: App function test
  • Figure 13: App function test
  • Figure 14: App function test
  • Figure 15: App function test

1. Introduction

Introduce the business problem:

There are many sales people in business organizations, especially in the field of sales

(automotive and consumer goods), and the company must manage those employees as

well as the sales of each employee, the money salary and commission, etc.

The application must use the Java programming language, run on a variety of operating

systems, have a straightforward user interface, and I will use Eclipse software to

implement the project.

Figure 1 : Eclipse

2. Requirement

SUGGESTED USE CASEs For the topic Employee, CommissionEmployee,

BasePlusCommissionEmployee:

  • usecase 1: Add a new CommissionEmployee and BasePlusCommissionEmployee
  • usecase2: Display the list of employee of a type
  • usecase3: Display the commission and salary of an employee

4. Implementation

4.1. Explain program structure

The following sections make up the program's structure:

  • The button Create input data with user input values on the form.
  • The operator can remove data from the table by using the Cancel Data button.
  • The Previous button shows information about previous employees.
  • A button that says "Next" will show the next employee's details.
  • File input function for data.
  • The data saving function.
  • Buttons User input values are used to create input data on the form.
  • The operator can remove data from the table by using the Cancel Data button.
  • The Previous button shows information about previous employees.
  • A button that says "Next" will show the next employee's details.
  • File input function for data.
  • The data saving function.

4.2. Explain classes.

Figure 3 : Code 1

Adjust the Employee class to conform to the layout properties (id, last name, first name,

Gender, DoB, Address, Phone, Email). This implies that the user of the application will

enter data using the Employee Information (GUI) layout. The application will then store

and retrieve the data using the properties listed below.

You can see the line next to Class Employee, that is a rule (interface). Object have to

implements Serializable interface in order that it can be written to be file as objects.

Figure 5 : Code 3

Then add the handler line “currentEmp = emp;” in line 302. And the pertinent objects

already contain the data in the layout.

Figure 6 : Code 4

Figure 7 : Code 5

Just like create button above. Next, I updated handler for Previous and Next button

Figure 8 : Code 6

Prepare OutputStream and write the whole employee list to the file.

4.3. Several screenshots of the application when it runs

Figure 10 : App Interface 1 Figure 11 : App Interface 2

This is the app interface when it run with those code above.

5. Test

Figure 12 : App function test 1

This is the load function, it can read the Object file then load the information of Employee.

There is 2 problems in this function, Gender and DoB weren’t load, so the information of

these will be set to default.

Figure 13 : App function test 2

6. Conclusion

I've learned a lot of new things thanks to this Java course. I know how to write and run

small programs, particularly this one. It helped me understand what needed to be done

to create an information entry table for employees. In general, I'm feeling a little better

about Java.

References

xuanthulab.net. (n.d.). Exception - Ngoại lệ trong Java. [online] Available at:

https://xuanthulab.net/exception-ngoai-le-trong-java.html

[Accessed 26 Oct. 2022].

VietTuts. (n.d.). Kết nối Java với MySQL. [online] Available at:

https://viettuts.vn/java-jdbc/ket-noi-java-voi-mysql

[Accessed 26 Oct. 2022].

docs.oracle.com. (n.d.). ‘Hello World!’ for the NetBeans IDE (The JavaTM^ Tutorials >

Getting Started > The ‘Hello World!’ Application). [online] Available at:

https://docs.oracle.com/javase/tutorial/getStarted/cupojava/netbeans.html.

[Accessed 26 Oct. 2022].

C. Thomas Wu. (2010). An Introduction on Object-Oriented Programming with Java.

5th ed. Library of Congress Cataloging-in-Publication Data, pp.445- 477

Paul Deitel – Harvey Deitel. (2012). Java for Programmer. 2nd ed. Library of

Congress Cataloging-in-Publication Data, pp.398- 467

w3Schools (2019). Introduction to Java. [online] W3schools.com. Available at:

https://www.w3schools.com/java/java_intro.asp.

[Accessed 26 Oct. 2022].

AltexSoft (2019). Non-functional Requirements: Examples, Types, How to Approach.

[online] AltexSoft. Available at: https://www.altexsoft.com/blog/non-functional-

requirements/.

[Accessed 28 Oct. 2022].

AltexSoft (2019). Non-functional Requirements: Examples, Types, How to Approach.

[online] AltexSoft. Available at: https://www.altexsoft.com/blog/non-functional-

requirements/.

[Accessed 28 Oct. 2022].