Unit 1 Programming - Assignment 3

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
UNIT 12 LO4 BE ABLE TO CREATE WEBSITES Cambridge Technicals.
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
MT311 Tutorial Li Tak Sing( 李德成 ). Uploading your work You need to upload your work for tutorials and assignments at the following site:
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering 3 October 2007.
CSE1301 Computer Programming: Lecture 13 Documentation.
A452 – Programming project – Mark Scheme
Software Development, Programming, Testing & Implementation.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
6 Steps of the Programming Process
Prepared by Uzma Hashmi Instructor Information Uzma Hashmi Office: B# 7/ R# address: Group Addresses Post message:
1 Shawlands Academy Higher Computing Software Development Unit.
1 v1.6 08/02/2006 Overview of Eclipse Lectures 1.Overview 2.Installing and Running 3.Building and Running Java Classes 4.Refactoring 5.Debugging 6.Testing.
GCSE OCR 3 A451 Computing Professional standards
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
BTEC Unit 06 – Lesson 08 Principals of Software Design Mr C Johnston ICT Teacher
The Software Development Life Cycle. Software Development SDLC The Software Development Life-Cycle Sometimes called the program development lifecycle.
CPSC1301 Computer Science 1 Overview of Dr. Java.
Mr. Dave Clausen1 La Cañada High School Chapter 6: Repetition Statements.
The Software Development Process
CSCI 1100/1202 April 1-3, Program Development The creation of software involves four basic activities: –establishing the requirements –creating.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
AVCE ICT – Unit 7 - Programming Session 12 - Debugging.
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Software Testing.
Component 1.6.
The need for Programming Languages
Working with Java.
C++ Plus Data Structures
The Software Development Cycle
Eclipse Navigation & Usage.
Testing and Debugging.
Computer Programming I
Loop Structures.
A451 Theory – 7 Programming 7A, B - Algorithms.
© 2015 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Understand the Programming Process
Design and Maintenance of Web Applications in J2EE
TRANSLATORS AND IDEs Key Revision Points.
Completing the tasks for A452 with….
Lesson 2 Understanding Software Bugs
Phil Tayco Slide version 1.0 Created Oct 2, 2017
PROGRAMMING METHODOLOGY
How to Run a Java Program
OCR Level 02 – Cambridge Technical
Test-driven development (TDD)
Chapter 1: Computer Systems
Coding Concepts (Standards and Testing)
Units with – James tedder
Units with – James tedder
Chapter 6: Repetition Statements
Understand the Programming Process
Debugging “Why you were up till 2AM”
Software Development Process
POS 408 Week 1 Individual Assignment Individual: Console Display Message//tutorfortune.com Click on below link to buy
IDE’s and Debugging.
Boolean Expressions to Make Comparisons
Running a Java Program using Blue Jay.
Outline Software Development Activities
Perl Programming Dr Claire Lambert
Review of Previous Lesson
Lab 8: GUI testing Software Testing LTAT
CHAPTER 6 Testing and Debugging.
The Software Development Cycle
Workshop for Programming And Systems Management Teachers
Presentation transcript:

Unit 1 Programming - Assignment 3 Theory Content and guidance

Assignment 3 Overview Your aim is to create a fully working, secure application that has been developed using an IDE and adheres to coding standards. Your code should contain an algorithm and some sort of user input either through the command line, swing or Java FX. The document portfolio should include: Evidence of how the IDE was used to manage the development of your code. An evaluation of developing applications using an IDE versus developing an application without using an IDE. An evaluation of the debugging process in the IDE used and how it helped with development. An evaluation of coding standards and the benefits to organisations of using them.

You will produce 5 documents/files: Stage 1 – Development Document - Evidence of how the IDE was used to manage the development of your code. Stage 2 – Report (IDE Evaluation) - An evaluation of developing applications using an IDE versus developing an application without using an IDE. Stage 3 – Report (Debugging Evaluation) - An evaluation of the debugging process in the IDE used and how it helped with development. Stage 4 – Report (Evaluation Report) including fully commented source code - An evaluation of coding standards and the benefits to organisations of using them. An installable and executable version of your application You are required to make use of appropriate structure, including headings, paragraphs, subsections and illustrations as appropriate, and all work must be supported with research and referenced using the Harvard referencing system.

Debugging The process of detecting and removing of existing and potential errors (also known as 'bugs') in a software code that can cause it to behave unexpectedly or crash. To prevent incorrect operation of a software or system, debugging is used to find and resolve bugs or defects.

Debugging Process - Tracing A technique of following (Tracing) your code line to line as the computer would. Working out exactly the values of variables throughout the program flow line by line. Programmers do this to make sure the program makes sense and to identify errors in the code. It can also be done to help understand another programmers code.

Debugging Process – Simple Tracing Example String title =“HNC Computing"; int number = 370; boolean result = true; number = number - 5; System.out.println( "Course is " + title); System.out.println( "Days are " + number); System.out.println( "Answer is " + result) result = false; System.out.println( "Answer is now" + result); When tracing you’d go through the code making a note of all variables. As you go line by line you would update the value of the variable. This could be done on paper. An example for this simple program is below: Char: J String title: HNC Computing int number = 370 365 boolean result: true false

Debugging Process – Breakpoints A line of code where you want to "pause" the execution of a program. This suspends the program allowing you to examine the code at this point of execution. Before starting the debugger, you need to set at least one breakpoint to suspend the execution inside the program.

Debugging Process – Watch Lists Allows you to "watch" the value of a variable. For example, if you have a variable named "x", you can type x inside the watch window and watch the value as you go from breakpoint to breakpoint. To add expressions to a watch list in NetBeans: 1. Click on the "Watches" tab at the bottom. 2. Type in a variable where it says <Enter new watch> to watch the name variable and press the enter button.

Consider possible security concerns and how these could be solved. Limit access to your classes, methods, and variables Every class, method, and variable that is not private provides a potential entry point for an attacker. By default, everything should be private. Make something nonprivate only with good reason, and document that reason. Make everything final (unless there's a good reason not to) If a class or method isn't final, an attacker could try to extend it in a dangerous and unforeseen way. More detailed information from Oracle: https://www.oracle.com/technetwork/java/seccodeguide- 139067.html

What is a coding standard? Why use them? Also known as coding conventions or syntax conventions What is a coding standard? Why use them? A set of guidelines, best practices, programming styles and conventions that developers adhere to when writing source code for a project. All big software companies have them. Coding standards are all about creating: Robust – Error-free and efficient. Readable – Easily read and understood. Rectifiable – Properly documented. Reusable – Capable of being used again. Keep in mind that coding standards can vary between company's. Have a look at “Google style” coding standards here: https://google.github.io/styleguide/javaguide.html Coding standards are NOT enforced by the compiler

So It is simply a set of rules and guidelines for the formatting of source code. This includes: Naming Conventions File Naming and Organization Formatting and Indentation Comments and Documentation Classes, Functions and Interfaces Pointer and Reference Usage Testing An example would be the use of two different styles of CamelCase: UpperCamelCase lowerCamelCase This standard could be different between teams needing to be refactored.

Refactoring The method of changing source code to meet a teams coding standard Used to improve readability or improve its structure. Any change that does not alter the behavior of the software can be considered refactoring.  Common refactoring involves: Changing variable names, methods names, moving methods or classes Splitting large methods into smaller ones.

Benefits of coding standards These include: Readability, maintainability and compatibility. Any member of the organization will understand the coding standard. Therefore coders can interchange without to much trouble understanding others code. Improves: Team coder Integration Maintenance Easier Problem Solving Minimises the need for excessive communication Lowers man hours for the organisation

Creating a executable file in netbeans Right-click on the Project name. Select Properties. Click Packaging. Check Build JAR after Compiling. Check Compress JAR File. Click OK to accept changes. Right-click on a Project name. Select Build or Clean and Build. Locate .jar file in “dist” folder of project

Learning Outcomes and Assessment Criteria Pass Merit Distinction LO3 Implement basic algorithms in code using an IDE P3 Write a program that implements an algorithm using an IDE. M3 Use the IDE to manage the development process of the program. D3 Evaluate the use of an IDE for development of applications contrasted with not using an IDE. LO4 Determine the debugging process and explain the importance of a coding standard P4 Explain the debugging process and explain the debugging facilities available in the IDE. P5 Outline the coding standard you have used in your code. M4 Evaluate how the debugging process can be used to help develop more secure, robust applications. D4 Critically evaluate why a coding standard is necessary in a team as well as for the individual.

1 of 3 - Your assignment should include: Stage 1 – Development Document P3 Create a simple application which implements basic algorithms, using Java and suitable IDE. Consider possible security concerns and how these could be solved. Documents the production of your code. Stage 2 – Report (IDE Evaluation) M3 Explain how you used the IDE to efficiently create your program D3 An evaluation of developing applications using an IDE versus developing an application without using an IDE.

2 of 3 - Your assignment should include: Stage 3 – Report (Debugging Evaluation) An evaluation of the debugging process in the IDE used and how it helped with development. P4 Part 1 Discuss how the debugging process can be used to help developers fix vulnerabilities, defects and bugs in their code. With reference to watch lists, breakpoints and tracing P4 Part 2 Produce documentation of the debugging process in the IDE. Include screenshots of errors and explain how you have solved them. M4 Evaluate how the debugging process can be used to help develop more secure, robust applications.

3 of 3 - Your assignment should include: Stage 4 – Report (Evaluation Report) including fully commented source code P5 Discuss what a coding standard is and its benefits when writing code. Outline the coding standard you have used. D4 Critically evaluate why a coding standard is necessary in a team as well as for the individual. Wrap up with a short evaluative conclusion summing up the overall process, what went well and what could be improved. Stage 5 – EXE file of complete program Create an EXE in NetBeans using the tutorial earlier in this PowerPoint