Pregunta | Respuesta |
What is the difference between syntax errors and semantic errors? Which is easier to fix and why? | The Program Development Life Cycle (PDLC) ̶ Preliminary debugging: Finds initial errors • Compiler errors: Program doesn’t run − Typically Syntax errors: When the programmer has not followed the rules of the programming language − Much easier to find and fix • Run-time error: Error that occurs when the program is running ̶ Logic (or Sematic) errors: Program will often run but produces incorrect results ̶ Use a ‘+’ sign instead of a ‘-’ sign in a calculation ̶ Some run-time errors are so grievous that the program crashes Chapter 13 page 12 |
2) Briefly describe four of the five phases of the Program Development Life Cycle (PDLC). | 1) PROBLEM ANALYSIS -problem is identified/considered and program specifications are developed (e.g. what it does, timetable, programming language to be used, etc.) 2) PROGRAM DESIGN -program specifications expanded into complete design of new program to show all things that program needs to do in specific (e.g. express using flowcharts or structure charts) 3) PROGRAM CODING -process of writing programming language statements to create the computer program -when choosing language consider things like suitability to the application, integration with other programs, and etc. 4) PROGRAM DEBUGGING & TESTING -process of ensuring program is free of errors (bugs) and before program can be debugged coded programs need to be translated into executable code (e.g. source code, object code) -testing occurs after programming appears to be correct and is used to find additional errors (should use good test data and consider things like alpha/beta test) |
3) Differentiate between a low-level and a high-level programming language. Give an example of each. | LOW- LEVEL PROGRAMMING LANGUAGE -difficult to code in; machine dependent -E.g., Machine/Binary language: computer instructions consisting of 1s and 0s HIGH-LEVEL PROGRAMMING LANGUAGE -closer to natural languages as it is easy to learn -E.g., Python, Cobol, Java |
4) Describe four different considerations when choosing a programming language. | 1) TARGETED PLATFORM/ STANDARDS FOR COMPANY -Important as you need to ensure the program looks the same for all users -E.g. "using CSS3 tags, HTML5, without checking browser compatibility, will cause the same site to look and behave differently across browsers- IBM website" 2) INTEGRATION WITH OTHER PROGRAMS -Before making a decision, you should know how the program has been designed and what features have been set aside as future improvements 3) PROGRAMMER AVAILABILITY -Is it easy to find someone who is familiar with this programming language if errors occur, so that they may be able to assist or fix the error within a reasonable time for the client 4) PORTABILITY - can it be used in operating systems other than the one in which it was created without requiring major rework? - is it suppose to or can it run on multiple platforms? |
5) Give two similarities and two differences between the programming languages of FORTRAN and COBOL. Stating that they are both programming languages is not worth any marks. | SIMILARITIES: -Both are high-level languages -Object oriented programming (object and data as opposed to actions and logic) DIFFERENCES: -Purpose is different: Cobol designed for managing large amount of data (business purposes) vs. Fortran designed for scientific purposes to easily perform scientific formulas and numerical analysis -Decline in use of Cobol, continuing use of Fortran |
6) Briefly discuss four tools use to aid in Program Design. | 1) STRUCTURE CHARTS -shows the overall organization of a program 2) PROGRAM FLOWCHARTS -shows graphically step-by-step how a computer program will process data 3) PSEUDOCODE -Uses English-like statements to outline the logic of a program (e.g., "IF (want drink=yes) THEN order drink") 4) UNIFIED MODELING LANGUAGE (UML) -Each object is identified along with its corresponding class, class properties, and variables (often used with object-oriented programming) |
7) Differentiate between source code and object code. | SOURCE CODE -coded program before it is compiled -Text based format -Generated by humans and input is given to compiler OBJECT CODE -machine language version of a program -Binary Numbers based format -Generated by compiler- output of compiler |
8) What is the difference between a class and an object? Use an example. | CLASS A template which defines a collection of data and actions on that data. Classes do not have a lifespan. OBJECT The instance of a class; and every object belongs to a class. Objects have a lifespan. E.G. 1) Zebras, lions, elephants, kangaroos can be classified as part of the animal class, and the individual animals in this class would be considered the objects of the class. So a zebra would be one object. 2) Red, blue, green, yellow can fall under the class "Colour". Blue would be an object in the class "Colour". |
9) Differentiate between a Sequential and Simultaneous (Concurrent) Action Block in Alice. Give an example of each. | Sequential Action Block -consist of lines of code that tell the program to do in order of which they are aligned. -e.g., if one were to incorporate the object of a man walking into the program, then to make the man walk would involve a number of codes that must be completed in order such as 1. bend lower right leg back 2. move one meter forward 3. bend right leg forward... the programmer would then place these lines of code into a Sequential block (i.e. "Do in order") SIMULTANEOUS ACTION BLOCK -these blocks are used to make objects perform actions at the same time, for example, if one would like to use a ferris wheel that has two round wheels, and the programmer wants both wheels to spin at once, he/she would need to write codes that state for example that: 1. Wheel A should spin clockwise, 2. Wheel B should spin clockwise, and place both these codes into a Simultaenous block (i.e. "Do together" |
10) When creating programs (worlds) in Alice, it was suggested that you use an Incremental Development Process. What does that mean and what is its primary advantage? | Incremental Development Process involves writing a few codes and running (i.e. playing) the program (script), and repeating the process every so often throughout the development of the program. This is done to find any problems that may incur and fix as you go along, because while instructions may seem easy to understand a particular combination of codes may not depict what you intended it to. (E.g. a person taking a few steps forward (i.e. walking) won't just be right leg forward, left leg forward, right leg forward, left leg forward) |
11) Describe the four types of Control Structures available in Alice. | A control structure is a statement that controls which instructions are executed and in what order. 1) DO IN ORDER Do the codes written in order (e.g. nodding: head tilts back, neck stretches, head tilts forward) 2) DO TOGETHER (Ferris Wheel example) 3) IF/ELSE In Alice, an If/Else control statement is used to check a condition and make a decision. The condition in an If statement is a Boolean function that yields a true or false value. 4) LOOP The Loop statement is a simple control structure that provides for repeating an instruction (or block of instructions) a counted number of times. |
12) Briefly describe four types of values that can result from using a Function in Alice. | A function asks a question (to check a condition) or computes a value. 1) BOOLEAN -true, false 2) STRING "Oh, Yeah!" 3) OBJECT snowman, helicopter 4) POSITION IN THE WORLD (0, 0, 0) – the center of an Alice world |
13) Perform the following operations assuming 6-bit 2’s complement binary numbers. a. 110101 + 001111 b. 010011 – 111101 | a) (32 +16 + 4 +1) + (8 +4 +2+1) 53+15=68 b) (16 + 2+ 1) + ( 32 + 16+ 8 + 4 +1) 19 + 61 = 80 https://www.youtube.com/watch?v=LpuPe81bc2w |
17) What is steganography? How does this differ from encryption? | Encryption/cryptography: - Messages are easy to find but we can’t read it Steganography - Is the practice of concealing messages or information within other nonsecret text or data. - Messages are easy to read but we can’t find them - Can also hide text so that people don’t know that there is a message hidden - Can use “spare” bits to store message |
18) Describe different problems when choosing colours. For example (but not a complete list), red on green, or green on black/white, yellow on yellow/grey? | 1. Red on green- users with deuteranopia (common form of color blindness) won't be able to see the difference between red and green (may appear to be the same colour with minimal if not no contrast) 2. Conflicts with mental processing of buttons (e.g. on the road, red usually means "stop!", where as green means "go!") 3. Colour hues can be too close on the visible spectrum. E.g. red and green compete to be brighter colour when placed together 4. May not be able to read lighter coloured font on a light background e.g. light yellow on white background |
20) What is an aspect ratio, and what are some common aspect ratios | - The ratio of the width divided by the height - Old school was 4:3 (t.v.), new stuff is usually 16:9 (there are others, like 16:10) - 720i and 720p and 1080i and 1080p are all 16:9 aspect ratios |
21) Distinguish between Frame by Frame animation and physical simulation. | |
22) How has animation been used to help people with autism? | - Animation DVD helps children with autism to recognise human emotions -Imagine what a confusing world it must be for a child who cannot understand the significance of a smile or a frown. - Children with autism tend to avoid looking at human faces and find it hard to understand why facial features move in the way that they do - This inability to read emotions on the human face impairs their ability to communicate with other people |
23) How does a dyslexic friendly font work? | -People with dyslexia treat letters as 3D objects -This can be a problem with reading - There are 26 letters and designs are often based on each other (e.g. vi - jw) -So if we rotate or mirror letters twin letters occur (b vs. p) - The letters of dyslexie have bolder bottoms and by minimizing or increasing the ascender or descender the difference between letters are emphasized (e.g. n vs. h) -Letters are slightly slanted, and periods and punctuation are bold so that sentences won't be combined when read. |
24) What are the major differences between internal and external memory? | INTERNAL -Individual internal memory (the brain) is limited -Small, fast for limited retrieval, convenient EXTERNAL -External memory, in a variety of forms, extends internal memory -Large, slow for limited retrieval, need to be handy |
25) Describe four Desirable Attributes of a data management system | 1) SHAREABLE - readily accessed by more than one person at a time 2) TRANSPORTABLE - easily move to the decision maker (e.g. telephone, Fax, computers) 3) TIMELY - quick retrieval of information when needed 4) SECURE -accessible by only those that are allowed to access |
26) Explain “A Database Management System allows us to Manipulate data” by using examples. | Manipulate data: update data (insert values, delete values, change values, but also generate reports based on the data and use queries to retrieve part or all of the data stored in the DB (e.g. attendance for a classroom, values can be deleted or inserted, average attendance ratio can be calculated, etc.) |
27) Explain the Key Attribute of an entity set. Consider the Entity set Cow with the attributes: Tag number, color, weight. What is the Key of this entity? Suggest another appropriate attribute for the Entity. | Entity Set: A collection of similar real-world objects that can be distinguishable from other objects -Attributes: properties of an entity set -"Key" uniquely identifies each entity in the entity set. In this example the Key would be "Tag number", and another appropriate attribute could be "name" |
28) Explain that “Artificial Intelligence is an interdisciplinary area.” Describe three academic disciplines that are relevant to AI. | AI is an interdisciplinary area as it involves many aspects that are a part of normal human intelligence such as visual perception, speech recognition, decision-making, and translation between languages which are attributed to different areas of study. PHILOSOPHY Logic, methods of reasoning, mind as physical system, foundations of learning, language, rationality. PSYCHOLOGY how do people behave, perceive, process cognitive, cognitive Science information, represent knowledge NEUROSCIENCE neurons as information processing units |
29) Describe four examples of Applications for Machine Learning. | |
30) In the example of “Decision Tree for Play Tennis” (discussed in class), how would you represent the three cases “Sunny”, “Overcast” and “Rain” using strings of binary numbers? | |
Image:
q1 (image/png)
|
|
Image:
q2 (image/png)
|
Image:
de (image/png)
|
Image:
input_bias (image/png)
|
¿Quieres crear tus propias Fichas gratiscon GoConqr? Más información.