CIT 217: Foundations of Sequential Programming
23 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What percentage of the total course mark do tutor-marked assignments count for?

30%

What percentage of the total course mark does the final examination count for?

70%

How many tutor-marked assignments are required to be submitted in total?

  • 5
  • 8 (correct)
  • 4
  • 3
  • The best three marks out of the four assignments count for 30% of the course marks. Each assignment is individually worth ______%.

    <p>7.5</p> Signup and view all the answers

    What is the main purpose of the CIT 217 course?

    <p>Overview of programming language evolution</p> Signup and view all the answers

    The CIT 217 course is designed to cover approximately twenty weeks.

    <p>False</p> Signup and view all the answers

    What are the two types of assignments in CIT 217?

    <p>Self-Assessment Exercises and Tutor-Marked Assignments</p> Signup and view all the answers

    The third module in CIT 217 deals with block structured languages and specification and translation of ______ language.

    <p>programming</p> Signup and view all the answers

    What is the process of identifying errors and eliminating them known as?

    <p>Debugging</p> Signup and view all the answers

    Syntax error and logical error are collectively known as features.

    <p>False</p> Signup and view all the answers

    Sequential programming is when the algorithm to be solved consists of operations one after the ____.

    <p>other</p> Signup and view all the answers

    What are the two important aspects of a programming language that one needs to learn?

    <p>Syntax and Semantics</p> Signup and view all the answers

    Match the following common names for input/output functions with their corresponding functions:

    <p>input = read output = write print = display</p> Signup and view all the answers

    What is programming?

    <p>Developing a series of instructions for a computer to perform a task</p> Signup and view all the answers

    Programmers need basic facilities and tools such as text editors, compilers, and interpreters to design, develop, and maintain computer programs.

    <p>True</p> Signup and view all the answers

    What is the purpose of a compiler in programming?

    <p>A compiler processes statements written in a programming language and turns them into machine language that a computer's processor uses.</p> Signup and view all the answers

    A program design is needed to write programs of reasonable ________.

    <p>quality</p> Signup and view all the answers

    Match the following program development life cycle phases with their descriptions:

    <p>Problem Definition = First step defining the problem statement and requirements Problem Analysis = Reviewing specifications to understand what the software should do Algorithm Development = Creating a step-by-step procedure to solve the problem Coding and Documentation = Using a programming language to write the actual program instructions Testing and Debugging = Finding and correcting logical errors in the program</p> Signup and view all the answers

    What is the purpose of a decision structure/selection structure in an algorithm?

    <p>To make a choice between two or more alternatives based on a given condition.</p> Signup and view all the answers

    Which logical operators are used in pseudo-codes for testing conditions?

    <p>and</p> Signup and view all the answers

    The __________ statement is used to test for true or false in pseudo-codes.

    <p>if</p> Signup and view all the answers

    In a selection structure, if the condition is false, Task-B is executed.

    <p>True</p> Signup and view all the answers

    What is the purpose of using an else statement with an if statement?

    <p>To provide an alternative set of conditions or actions if the initial condition is not met.</p> Signup and view all the answers

    Study Notes

    Course Overview: CIT 217 - Foundations of Sequential Programming

    • The course is a three-credit unit course divided into three modules, covering eight units.
    • The course aims to introduce students to the principles of programming languages, computer architecture, and programming language specification and translation.

    Module 1: Principles of Programming

    • Unit 1: Principles of Programming
      • Introduces the basic principles of programming in high-level languages
      • Covers program design and specification, sequential program structure, and classification of programming languages
    • Unit 2: Evolution of Programming Languages
      • Discusses the evolution of programming languages from machine language to high-level languages

    Module 2: Computer Architecture

    • Unit 1: Basic Machine Architecture
      • Introduces basic computer architecture models and microprocessor and memory systems
    • Unit 2: Data Storage in Computer
      • Covers data storage and representation in computer systems
    • Unit 3: Operations on Data
      • Discusses operations on data, including logical, shift, and arithmetic operations
    • Unit 4: Machine Instructions
      • Covers machine instructions, instruction formats, and addressing modes

    Module 3: Block Structured Languages and Programming Language Specification

    • Unit 1: Block Structured Languages
      • Introduces block structured languages, including programming language paradigms and subprograms
    • Unit 2: Specification and Translation of Programming Languages
      • Covers programming language specification, syntax, and semantics, and programming language translators (assemblers, compilers, and interpreters)

    Course Objectives

    • Explain the relationships between high-level languages and computer architecture
    • Describe the models of computer architecture
    • Explain how data is stored and processed in computer systems
    • Understand the basic principles of programming in high-level languages
    • Explain the evolution of programming languages
    • Describe the specification and translation of programming languages

    Course Assessment

    • Assignments (30% of total course marks)
    • Final examination (70% of total course marks)
    • Tutor-marked assignments (four assignments, best three marks count)

    Course Materials

    • Course Guide
    • Study units
    • Recommended texts
    • Assignment file

    Study Tips

    • Create a study schedule and stick to it
    • Organize your study materials and follow the course structure
    • Review the objectives for each study unit to confirm understanding
    • Consult your tutor when needed### Foundations of Sequential Programming
    • This course introduces students to the fundamental concepts of computer programs and how computer systems process them.

    Importance of Continuing Assignments

    • Do not wait for the return of an assignment before starting on the next unit.
    • Keep to the schedule and pay attention to the tutor's comments on the assignment.

    Facilitators/Tutors and Tutorials

    • The course provides 15 hours of tutorials.
    • Tutors will mark and comment on assignments, monitor progress, and provide assistance.
    • Students can contact tutors by telephone or email for help.

    Circumstances for Seeking Help

    • If students do not understand any part of the study units or assigned readings.
    • If they have difficulty with self-tests or exercises.
    • If they have a question or problem with an assignment or its grading.

    Attending Tutorials

    • Attend tutorials to have face-to-face contact with the tutor and ask questions.
    • Prepare a question list before attending tutorials.

    Course Objectives

    • Understand the fundamental concepts of computer programming.
    • Acquire basic knowledge of program structure and basic computer architecture.
    • Develop skills in designing and writing simple computer programs.

    Principles of Programming

    • Programming is the process of developing a series of instructions to be given to a computer to perform a specific task.
    • Computers do not understand natural language and require programming languages.
    • A programmer requires basic facilities and tools, such as text editors, compilers, interpreters, and diagnostic tools.

    Program Design and Specification

    • Program design applies to the development of computer programs.
    • A program specification is part of a system specification, which defines the whole system.
    • The aims of program design are reliability, maintainability, readability, performance, and storage saving.

    Program Development Life Cycle

    • The program development life cycle is a set of steps used to develop a program.
    • The steps are:
      • Problem definition
      • Problem analysis
      • Algorithm development
      • Coding and documentation
      • Testing and debugging
      • Maintenance

    Sequential Program Structures

    • Sequential programming is when the algorithm to be solved consists of operations one after the other.
    • Sequential program structures are forms in which program components are constructed, organized, and interrelated.
    • The main features of the computer are still visible in features of the programming language, including storage, input and output, operation on data, and control.

    Storage

    • Computers require a set of instructions and data to be stored in their memory to perform a specific task.
    • In programming languages, data are identified by name rather than by their location addresses in main storage.
    • The names that associate stored data values are called identifiers.### Identifiers and Variables
    • An identifier is a constant if it is always associated with the same data value
    • A variable is a symbolic name assigned to a data item by the programmer, and its associated data value can change during a computing process
    • A variable must be declared, stating its data type and value
    • Examples of data types include integer, real, Boolean, and character or string

    Data Declaration

    • A data declaration defines a variable, specifying its name and data type
    • Implicit declaration occurs when the compiler determines the data type without explicit definition
    • Explicit declaration occurs when the programmer explicitly defines the data type
    • Examples of declaration: Float A, B;

    Input and Output

    • Programming languages have special functions for dealing with input and output
    • Examples of input/output functions: input, read, get, accept, output, write, print, put, display
    • In Java, System.out refers to the standard output device, and System.in refers to the standard input device

    Operations on Data

    • Operations on data items are expressed in the form of statements
    • The assignment statement consists of a variable name, followed by the assignment operator (=), followed by an expression
    • Examples of assignment statements:
      • Initialize a variable: count = 0
      • Increment/decrement a counter: count = count + 1
      • Accumulate values: sum = sum + item
      • Capture the result of a computation: y = 3*x + 4
      • Swap two values: t = x; x = y; y = t

    Control Structures

    • Control structures include sequence, selection, and repetition structures
    • Sequence structure: a series of steps executed in order
    • Selection structure (decision structure): choose between two or more alternatives based on a condition
      • Example: If condition is true then do Task-A else do Task-B
    • Repetition structure: repeat a set of steps until a condition is met
      • Examples: Repeat-Until, While, For loops

    Selection Structure

    • The selection structure (decision structure) involves making a choice between two or more alternatives based on a condition
    • If-else statements are used to implement the selection structure
    • Example: If mark &gt;= 80 then display "distinction" else if mark &gt;= 60 then display "merit" else if mark &gt;= 40 then display "pass" else display "fail"

    Repetition Structure

    • Repetition structures include Repeat-Until, While, and For loops
    • Repeat-Until loop: repeat a set of statements until a condition is true
      • Example: REPEAT ... UNTIL condition
    • While loop: repeat a set of statements while a condition is true
      • Example: WHILE condition DO ... ENDWHILE
    • For loop: repeat a set of statements for a specified number of iterations
      • Example: FOR (initialization, stopping condition, increment) ... ENDFOR

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    This course guide covers the foundations of sequential programming, including concepts and principles of programming.

    More Like This

    Sequential Structure in Computing Quiz
    5 questions
    IT2402 Basics of Programming
    10 questions

    IT2402 Basics of Programming

    EfficientClarinet2918 avatar
    EfficientClarinet2918
    Use Quizgecko on...
    Browser
    Browser