1 Pre-Exam Class CSIT121 Fall 2000 Exam-II (Final Examination) TUESDAY DECEMBER 19th 8:30AM.

Slides:



Advertisements
Similar presentations
Core Java Lecture 4-5. What We Will Cover Today What Are Methods Scope and Life Time of Variables Command Line Arguments Use of static keyword in Java.
Advertisements

CSCI 160 Midterm Review Rasanjalee DM.
Chapter 7 User-Defined Methods. Chapter Objectives  Understand how methods are used in Java programming  Learn about standard (predefined) methods and.
True or false A variable of type char can hold the value 301. ( F )
Computer Science 1620 Loops.
1 Chapter 11 Structured Types, Data Abstraction and Classes Dale/Weems/Headington.
Wednesday, 12/11/02, Slide #1 CS 106 Intro to Comp. Sci. 1 Wednesday, 12/11/02  QUESTIONS??  Today: CLOSING CEREMONIES!  HW #5 – Back Monday (12/16)
Chapter 5: Loops and Files.
Wednesday, 10/9/02, Slide #1 CS 106 Intro to CS 1 Wednesday, 10/9/02  QUESTIONS ??  Today:  Discuss HW #02  Discuss test question types  Review 
1 Lab Session-7 CSIT-121 Fall Revising Structured Choice 4 The While Loop variations 4 Lab Exercises.
1 Lecture 29 Chapter 11 Structured Types, Data Abstraction and Classes Dale/Weems/Headington.
1 Exam Guide CSIT121 Summer-I 2001 Exam-II (Final Examination) Thursday June 28th 9:30AM.
Chapter Objectives You should be able to describe: Object-Based Programming Classes Constructors Examples Common Programming Errors.
CS 1 Lesson 5 Loops and Files CS 1 -- John Cole.
CSCI/CMPE 4341 Topic: Programming in Python Chapter 3: Control Structures (Part 1) – Exercises 1 Xiang Lian The University of Texas – Pan American Edinburg,
COMP1170 Midterm Preparation (March 17 th 2009) Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education.
1 Lab Session-VI CS121 Fall 2000 l HW#2 Assigned l Multiple Choice Selectors l The While Loop l Switch-Case-Break Exercise l The Counter Controlled Loops.
Topic 4 – Programmer- Defined Functions. CISC 105 – Topic 4 Functions So far, we have only seen programs with one function, main. These programs begin.
CECS 121 EXAM 1. /* C Programming for the Absolute Beginner */ // by Michael Vine #include main() { printf(“\nC you later\n”); system(“pause”); }
 2006 Pearson Education, Inc. All rights reserved Arrays.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
1 Revision Before Exam-I. 2 Exam-I Scope l We discussed the scope of Exam-I and decided to move the topic of file handling to the final exam l A previously.
1 Chapter 9 Additional Control Structures Dale/Weems/Headington.
Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 6 Functions.
Copyright © 2012 Pearson Education, Inc. Chapter 6: Functions.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Additional Control Structures. Chapter 9 Topics Switch Statement for Multi-way Branching Do-While Statement for Looping For Statement for Looping Using.
Copyright 2004 Scott/Jones Publishing Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 7 Structured Data and Classes.
1 Chapter 9 Additional Control Structures Dale/Weems.
1 Additional Control Structures. 2 Chapter 9 Topics  Switch Statement for Multi-way Branching  Do-While Statement for Looping  For Statement for Looping.
A First Book of ANSI C, Fourth Edition1 Functions for Modularity 04/24/15.
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
Chapter 13 – C++ String Class. String objects u Do not need to specify size of string object –C++ keeps track of size of text –C++ expands memory region.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 6 Functions.
Starting Out with C++ Early Objects ~~ 7 th Edition by Tony Gaddis, Judy Walters, Godfrey Muganda Modified for CMPS 1044 Midwestern State University 6-1.
Chapter Functions 6. Modular Programming 6.1 Modular Programming Modular programming: breaking a program up into smaller, manageable functions or modules.
Loops and Files. 5.1 The Increment and Decrement Operators.
1 Standard Version of Starting Out with C++, 4th Brief Edition Chapter 5 Looping.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5: Looping.
Agenda Perform Quiz #1 (20 minutes) Loops –Introduction / Purpose –while loops Structure / Examples involving a while loop –do/while loops Structure /
Chapter 6 Functions. Topics Basics Basics Simplest functions Simplest functions Functions receiving data from a caller Functions receiving data from a.
 2008 Pearson Education, Inc. All rights reserved. 1 Arrays and Vectors.
1 ICS103 Programming in C Lecture 8: Functions I.
L what are executable/non-executable statements l out of the ones below which constructs are executable #include p=3.14; const double PI=3.14; int myfunc(int);
Fall 2015CISC/CMPE320 - Prof. McLeod1 CISC/CMPE320 Assignment 1 due Friday, 7pm. RAD due next Friday. Presentations week 6. Today: –More details on functions,
1 Programming in C++ Dale/Weems/Headington Chapter 9 Additional Control Structures (Switch, Do..While, For statements)
EEL 3801 C++ as an Enhancement of C. EEL 3801 – Lotzi Bölöni Comments  Can be done with // at the start of the commented line.  The end-of-line terminates.
Lecture 2 Functions. Functions in C++ long factorial(int n) The return type is long. That means the function will return a long integer to the calling.
Copyright © 2015, 2012, 2009 Pearson Education, Inc., Publishing as Addison-Wesley All rights reserved. Chapter 6: Functions.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
Chapter Looping 5. The Increment and Decrement Operators 5.1.
1 CSE 142 Final Exam Review Problems. 2 Question Types expressions array mystery inheritance mystery file processing array programming Critters classes.
CPS120 Introduction to Computer Science Exam Review Lecture 18.
Chapter Looping 5. The Increment and Decrement Operators 5.1.
CS 1430: Programming in C++ 1. File Input in VS Project Properties Debugging Command Arguments quiz8-1.out We want to know how to do it ourselves, right?
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
1 Chapter 12 Classes and Abstraction. 2 Chapter 12 Topics Meaning of an Abstract Data Type Declaring and Using a class Data Type Using Separate Specification.
Chapter 12 Classes and Abstraction
- Standard C Statements
Multiple Files Revisited
7 Arrays.
Additional Control Structures
6 Chapter Functions.
3-4-5 Introduction.
Fundamental Programming
Multiple Files Revisited
Dale Roberts, Lecturer IUPUI
Standard Version of Starting Out with C++, 4th Edition
Presentation transcript:

1 Pre-Exam Class CSIT121 Fall 2000 Exam-II (Final Examination) TUESDAY DECEMBER 19th 8:30AM

2 Pre-Exam Class CSIT121 Fall’00 The following topics are included in exam: (1) Top Down Design (2) Selection (3) Repetition (4) Function Arguments and Returning values (5) File Input and Output (6) Arrays and Structures (7) Classes

3 Exam Style Exam-II is similar in style and structure to Exam-I There are 15 MCQ type questions. In these questions, you will have to fill in the blanks, select one out of many choices, give a short answer or indicate true or false Each of these short questions carries one mark

4 Exam Style The remaining 15 marks are distributed in 5 long questions. These questions may have one or more of the following: Writing a program Detecting logical mistakes in a program Detecting typing mistakes in a program Converting one program into another

5 Exam Topics Top Down Design In this topic, we learned about writing the main() as “driver” function. Its only job is to initialize some variables and call other functions to do the job For example, in a menu driven program, main() calls a display function that displays choices Be careful to integrate all functions well and declare function prototypes before using

6 Exam Topics Selection In this topic, we applied decision logic to select between several choices We also learned how to write a selection condition expression, without any semicolons For example, if (x==5) cout<<“Bingo”; else cout<<“Try again”;

7 Exam Topics The selection expression is a logical expression that evaluates to true or false We also learned about using &&, ||, or ! Logical operators to write expressions If multiple integer or char choices are available, we can use switch-case statement

8 Exam Topics Repetition We used different variations of loops. For example, while (condition is true) {…}, do {…..} while (condition is true) We also used counter controlled loops for (count=1; count<=100; count++) cout<<count*count<<endl;

9 Exam Topics Function Arguments When a function is called, a number of data items can be passed to this function The data items passed are called arguments (or parameters) The number of arguments and their type is already specified in the prototype of the function and also the header of function

10 Exam Topics A function that takes two numbers and returns square of their difference PROTOTYPE diff_square(int,int,int&); FUNCTION HEADER diff_square(int num1, int num2, int& diffsq) { diffsq=num1-num2; diffsq= diffsq*diffsq; }

11 Exam Topics File I/O We learned about sequential file handling in our programs #include is required for file handling input file: ifstream file_handle_name output file: ofstream file_handle_name

12 Exam Topics Arrays and Structures We use arrays to group several related data items under a common name. All items must be of same data type We pass arrays to functions by reference. However, we can use keyword const to protect arrays that should not be modified

13 Exam Topics For grouping different types of data under a common name, we use structs. Arrays of structs serve the purpose of creating an information repository about several objects such as books, students etc. Unions recycle the memory space by keeping only one member active

14 Exam Topics Classes Classes are templates for defining objects Objects provide a public interface to their functions hiding implementation details Objects protect the private data from non- member functions thus making debugging easier

15 Exam Topics User defined classes We can define our own classes in header files and implement member functions in a separate program file A client program is written separately that declares objects belonging to classes and uses the objects to carry out required work