Lecture 6 Flashcards

1
Q

What is procedural programming? How were programs written prior to procedural programming?

A

Procedural programming is a method of program design.

It has calls of functions that was used to extract what is needed in each function.

It is not hard to use and more organized compared to the previous statement “GO TO” that results in a spaghetti code. GO TO → Messy, tricky, and hard to solve.

Procedural programming is not tricky, it’s neat, and could be reused in the same program or others. Every section performs a task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the difference between compiler errors and run-time errors? Give examples of each

A

Errors appear during program debugging (finding errors).

Compiler errors: appears when the programmer did not follow the syntax rules accepted by the program. This makes the program not work.

This type of error is easy to find and fix. If JAVA was used in a program that is not using ALGOL language the program will not work.

Run-Time errors: errors that occur when using a wrong sign such as ‘+’ instead ‘-’ which will make the program run and work but it will not give the wanted results. Some errors might crash the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe 4 of the 5 phases of the Program Development Life Cycle.

A

The program development life cycle (PDLC) is the process of creating programs with the steps involved:

Program Analysis: considering the problem and programs are developed according to that. Goal: understanding the problem the software must perform. Outcome: Time table, what it does, programming language to use

Program Design: The program specifications are exported Into a new program. Tools used: structure chart, program flowchart to explain how the program is used in steps. Pseudocode: using English-like statements to show program outline. If (x) Then (Y). More detailed design → Good!

Program Coding: The process of writing the programming language to create computer program. This step should include the proper use of comments for many reasons such as: identifying the main parts of the program and to explain variables. Outcomes → source codes.

Program Debugging and Testing: Finding errors. Making sure programs are free of errors (bugs). Before debugging codes should be translated into executable codes. Two types of codes:
Source codes: what the programmer sees
Object codes: what is implemented on a computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe 4 different considerations when choosing a programming language

A

Before choosing a program language consider:

Integration with other programs: compatible with other programs. If in a plane, does it work at airports?

Suitability to the application: is it suitable for what you are doing? Such as using TAVA to code a calculator? Good for kids, understandable. Good for a game?

Program availability: there are languages that might not have a lot of people who know how to write it; it might be an older one. Is there anyone who can use it?

Portability to be run on multiple platforms: does it work on safari, chrome, firefox?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe the difference between source code and object code

A

Source code: coded programs before they are compiled,
which are the codes that the programmer can see.

Object code: machine language version of a program,
which is what is executed on a computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly