100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary 2.3 - producing robust programs $10.33   Add to cart

Summary

Summary 2.3 - producing robust programs

 3 views  0 purchase
  • Course
  • Institution

GCSE OCR COMPUTER SCIENCE J277 2.3 - producing robust programs 2.3.1 Defensive design, 2.3.2 Testing

Preview 1 out of 2  pages

  • August 26, 2022
  • 2
  • 2021/2022
  • Summary
  • 1
avatar-seller
Defensive desigrr helps to ensure that programs are functioning properly. They should never break or
produce errors if they are functioning properly.
+ anticipate how users may misuse their program, then attempt to prevent it from happening
, ensure the code is well-maintained
) reduce the number of errors in the code throush testins
*"ii:r;";i;ia . q.\\e'^a*s\oq\\ev o.(cessnqhk
/
. .rtte,-.pvs to
'e,-o\4\.1q6,^,,r.1 .t;"\* irr;'oit^.ti
)


The easiest way for misuse in a program is when enteiing data. This can be prevented using validation.
INPUTVAIIDATION-l checking if data meets certain criteria before passing it into the program
o Range check - checks the data is within a specified range --o 1,., w,f sov1 ! o.ho- -,sr.,.o.,q\ o[
. presence check - checks data has been entered u^u2a1k$ c\,r.crrq.clevS +"..) r,.,^.

. '-t-'Li1^,*sl
\xpret dotlq
Format check - checks data has the correct format e.g. adare SOL ir,\
\echo"r
. Look-up table - checks data against a table of acceptable values
r tlrpe check - checks data is the right type such as string, integer etc
o Length check - checks the data is the correct length
cNhc/v^'
A,,r*--<\ Ir,'Wrl'{' f
'Je/n+\
AUTHENTICATION - confirms the identity of a user before they are allowed to access certain pieces of data
or features of the program. This is commonly done using passwords.
E.g. passwords, user ID, PIN number, biometric security such as facial/voice recognition, pattern recognition



To increase the securitv of Dassword -based authentication svstems:
) force users to use strong passwords and to change them regularly
-) limit the number of failed authentication attempts before access is lost
+ ask for a random selection of characters from the password on each authentication


To imDrove the main bilitv of a nrosram
) comments are useful to explain the key features of a program - they are fundamental to help other
programmers understand your program
-) indentation is used to separate different statements in a program. This allows other programmers to pick
out the different features
)identifiers should be named suitably so they refer to what they actually are. It helps programmers
understand what they do and it makes it easier to keep track of them
-) use sub programs to make it easier for other programmers to see how different parts of a program work,
which can help the overall program faster. Sub program code can also be reused.
5ood S,!11ch. r-e.
-----r


SYNTAX ERRORS - where the program code syntax is not correct e.g. misspelt words, missing space, colon
etc. program does not run
U)GIC ERRORS - incorrect code that causes the program to run, but wrong output is produced

r(hc"\\.<
ro A.V*1

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller harinisaseetharan. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $10.33. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76658 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$10.33
  • (0)
  Add to cart