The purpose of defensive design is to ensure that a program runs correctly and continues to run no matter what actions a user takes. This is done through ____ for all possibilities (contingencies) and thinking about what a ____ may do that the program does not expect. Defensive design encompasses three areas: 1. Protection against unexpected user ____ or actions, such as a user entering a letter where a number was expected 2. Maintainability - ensuring code is ____ and understandable 3. Minimising/ removing ____ This anticipation and protection is done through: 1. Validation 2. Input sanitisation 3. Authentication 4. Maintenance 5. Testing Authentication Authentication is the process of a user ____ that they are who they say they are on a ____ system. In a network, this is often done through inputting a ____ and password. For networks that require high levels of ____, authentication may include other methods. The factors of authentication can be broken down into three main groups: 1. Something you ____ - username, bank account number, or anything that identifies the user uniquely 2. Something you know - password, pin, secret answer to a question 3. Something you ____ - swipe card, biometrics, any other physical identifying device A programmer should consider that any ____ a user makes may be incorrect and should ____ arrangements for such unexpected actions. Using validation helps a programmer to ensure that any data input is possible and sensible. Validation applies rules to inputted data. If the data does not follow the ____, it is rejected, reducing the risk that incorrectly input data may crash a program. A programmer can build various types of validation into a program: 1. ____ check - the input must fall within a specified range. 2. ____ check - the input must not be too long or too short. 3. Presence check - a data value must be ____. 4. ____ check - the data must be in the correct format, such as entering a date in the format DD/MM/YYYY. 5. ____ check - the data must be of a specified data type, such as an integer when specifying a quantity. Many programs use one or more of these ____ checks. For example, when signing up for a user account on a website, the validation might include: 1. Presence check - a username must be ____ 2. Length check - a password must be at least eight ____ long 3. Range check - age ____ may require the user's date of birth to be before a certain date 4. Format check - the user's date of birth must be entered in the specified format 5. Type check - the password may need to have a mixture of upper and lower case letters, a number and a special character Validation does not ensure that the data entered is correct, just that it is possible and sensible. A user may accidentally enter a date of birth that is possible and sensible, but ____. The program has no way of knowing that the date has been entered incorrectly.
0%
2.3 Producing Robust Programs
แชร์
แชร์
แชร์
โดย
Dprice7
KS4
Computing
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
เติมประโยคให้สมบูรณ์
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
รูปแบบเพิ่มเติมจะปรากฏเมื่อคุณเล่นกิจกรรม
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม