Summary of the Lecture

Size: px
Start display at page:

Download "Summary of the Lecture"

Transcription

1 Summary of the Lecture 1 Introduction 2 MATLAB env., Variables, and format MATLAB function, arrays and operations Algorithm and flowchart M-files: Script and Function Files 6 Structured Programming Conditional statements 7 Structured Programming Loops 1

2 Dr. Zarina Ab Muis Faculty of Chemical Engineering Universiti Teknologi Malaysia, UTM Johor, Johor Bahru, Malaysia 2

3 Topic Outcomes Week Topic Topic Outcomes 9-11 Relational and logical operators The if end structure The if else end structure The if elseif else end structure The switch case statement Case study in chemical engineering Understand and apply the relational and logical operators Write program with if...end structure Write program with switch-case statement Solve chemical engineering problem related with program consist conditional statements 3

4 Outline of the Lecture Introduction Relational and Logical Operators The If end structure The If else end structure The If elseif else end structure The switch case statement 4

5 Introduction What is Structured Programming? Structured programming allows MATLAB to make decisions or loops based on conditions of the program. Decisions in MATLAB are based on the result of logical and relational operations and are implemented with if, if else, and if elseif structures. 5

6 Structured programming If end == OR ( ) >= AND (&) NOT (~) If-elseend switchcase < 6

7 Outline of the Lecture Introduction Relational and Logical Operators The if end structure The if else end structure The if elseif else end structure The switch case statement 7

8 Relational and Logical Operators Relational Operators: Compare 2 numbers by determining whether a comparison statement is TRUE (1) or FALSE(0) E.g: 10 < 15 Logical Operators: Examines true/false statements and produce result that is TRUE(1) or FALSE(0) E.g: AND (&) 8

9 Relational Operators < Less than > Greater than No Space between two signs <= >= Less than or equal to == Equal to Greater than or equal to ~= Not equal to 9

10 Relational Operators When Two numbers (X and Y) are compared: X >= Y If the comparison according to RO is TRUE, the result is 1 If the comparison is FALSE, the result is 0 10

11 Relational Operators If X and Y are scalars, the result is a scalar 1 or 0 Exercise: 5 >= 10 ans= 0 i. 13<13 ii > 10 iii. 5~=5.1 iv. 1<2<3 v. 12<15>10 vi. 12-4<5x3<4 11

12 Relational Operators If X and Y are arrays (same size), the comparison is done element-by-element, and the result is a logical array of the same size X=[2 8 10] Y=[1 8 13] X >= Y ans= [1 1 0] 12

13 Relational Operators Exercise Given: v=[ ] and u=[ ] i. u< v ii. Z=v>=u iii. u==abs(v) iv. Z>=u+v Ans: Ans: Ans: Ans:

14 Relational Operators If X is scalar, Y is array. X is compared with every element in the array, and the result is a logical array of the same size as Y. X=10 ; Y=[1 13 8] X >= Y ans= [1 0 1] 14

15 Relational Operators Exercise Given: D=[4-1 7 ; ; ]. Checks which elements in D are smaller than or equal to 3. Assigns the results to matrix Z. Ans: 15

16 Logical Operators AND (&) E.g: X & Y Operates on 2 operands (X and Y) If both X and Y are true =1, otherwise false = 0 OR ( ) E.g: X Y Operates on 2 operands (X and Y) If either one, or both are true = 1, otherwise (both false) = 0 NOT (~) E.g: ~X Operates on 1 operand (X) Give the opposite of X; true=1 if X is false, and false=0 if X is true 16

17 Logical Operators TRUE = Nonzero number FALSE = Zero number Logical operators can be used with scalars and arrays 17

18 Logical Operators Exercise Given: v=[ ] and u=[ ] i. ~~u ii. v & u iii. u(3) v iv. v==~u Ans: Ans: Ans: Ans:

19 Outline of the Lecture Introduction Relational and Logical Operators The if end structure The if else end structure The if elseif else end structure The switch case statement 19

20 Decision Decisions are made in MATLAB using if structures, which may also include several elseif branches and possibly a catch-all else branch. Deciding which branch runs is based on the result of conditions which are either true or false. If an if tree hits a true condition, that branch (and that branch only) runs, then the tree terminates. If an if tree gets to an else statement without running any prior branch, that branch will run. 20

21 The if end structure A command that allows MATLAB to make decision of whether to execute a group of commands or to skip these commands. False Flowchart if statement True Commands end MATLAB program If conditional expression A group of MATLAB commands end MATLAB program 21

22 The if end structure Exercise 6.1: Write a program in a script file that calculate the parking fees at a shopping mall. The first 1 hour is free. If more than 1 hour, the customer needs to pay RM1.00 for the first hour and RM0.50 for every additional hour. The program asks the user to enter the duration (in hour). The program should display fees for parking lot. Run the program for the following cases: i) 0.5 h ii) 1 h iii) 3 h 22

23 Outline of the Lecture Introduction Relational and Logical Operators The if end structure The if else end structure The if elseif else end structure The switch case statement 23

24 The if end structure A command that allows MATLAB to make decision of whether to execute a group of commands or to skip these commands. False Flowchart if statement True Commands end MATLAB program If conditional expression A group of MATLAB commands end MATLAB program 24

25 The if-else-end structure False Commands Group2 Flowchart if statement True Commands Group1 end MATLAB program if conditional expression Group1 of MATLAB commands else end MATLAB program Group2 of MATLAB commands 25

26 Example: if-else-end Write a program to calculate Z according to L value. If L less than or 10, Z=Lx10. Otherwise, return an error msg. Start L False 1. Start if L <=10 2. Give input L 3. Check L is less or equal to 10, if yes go to step 4. if No, go to step 6 4. Calculate Z=Lx10 5. Print Z 6. Print Error!. L is not in the specified range 7. Stop Print Error!. L is not in the specified range Z=L*10 Print Z End True 26

27 The if-elseif-elseend structure False Commands Group 3 False elseif statement True Commands Group 2 Flowchart if statement True Commands Group 1 end MATLAB program if conditional expression elseif else end MATLAB program Group 1 of MATLAB commands Group 2 of MATLAB commands Group 3 of MATLAB commands 27

28 Example: if-elseif-else-end Write a program to calculate Z according to L value. If L less than or 10, Z=Lx10. But, if L in the range of 15 to 11, Z must be calculated using Z=Lx Otherwise, return an error msg. 1. Start 2. Give input L 3. Check L is less or equal to 10, if yes go to step 4. if No, go to step 6 4. Calculate Z=Lx10 5. Print Z 6. Check L is less than or equal to 15 and greater than 10, if YES go to step 7, if NO go to step Calculate Z=Lx Print Z 9. Print Error!. L is not in the specified range 10. Stop 28

29 Exercise 6.2: If-else-end Write a program in a script file that calculate the parking fees at a shopping mall. If customer parked less than 1 hour, parking fee is free. If more than 1 hour, the customer needs to pay RM1.00 for the first hour and RM0.50 for every additional hours. The program asks the user to enter the duration (in hour). The program should display fees for parking for each cases including free parking. Run the program for the following cases: i) 0.5 h ii) 1 h iii) 3 h iv) 5.5 h 29

30 Exercise 6.3: Figure 1 30

31 Outline of the Lecture Introduction Relational and Logical Operators The if end structure The if else end structure The if elseif else end structure The switch case statement 31

32 The switch-case statement Another method to direct the flow of a program It provides a means for choosing one group of commands for execution out of several possible groups. The first line is the switch command Switch switch expression Several case commands Scalar/ string/ math expression After last case, there is optional for otherwise command Last line must be an end statement 32

33 The switch-case statement MATLAB program switch switch xpression case value1 Group 1 of commands case value2 Group 2 of commands case value3 otherwise end MATLAB program Group 3 of commands Group 4 of commands 33

34 The switch-case statement Example: To calculate the area for different cases Case 1: area=lxw Case 2: area=pi*d 2 Otherwise return error msg 34

35 Recap of the previous lecture 35

36 The switch-case statement Write a program to convert temperature in Celcius to either Kelvin or Fahrenheit using switch-case statement. The output might look like this 36

37 Tutorial 6.1 Body Mass Index (BMI) is a measure of obesity. In standard units, it is calculated by the formula BMI Below 18.5 Classification Underweight 18.5 to 24.9 Normal 25 to 29.9 Overweight 30 and above Obese Write a program to calculate the BMI of a person. The program asks the person to enter his or her weight(kg) and height(m). The program display the result of the BMI value and the BMI classification. i) A person 160 cm and 65 kg ii) iii) A person 110 cm and 45 kg Your BMI 37

38 Tutorial 6.2 Write a computer program in a script file that determines the test grade for a student. Display the results of mark and grade. Execute the program for the following cases a) 53 b) 78 c) 80 38

39 Tutorial 6.3 Modify the program developed in Tutorial 6.2 to determine the final grade of a subject from the assessment distribution below. Display the results of final mark and grade for all students Assessment Total Mark Percentage Quiz Test Test Final Name Quiz Test 1 Test 2 Final Grade Ahmad Wan Anis Najwa

40 Exercise 6.4 Write a user-defined MATLAB function, with two input and two output arguments that determines the height in centimeters (cm) and mass in kilograms (kg)of a person from his height in inches (in.) and weight in pounds (lb). (a) Determine in SI units the height and mass of a 5 ft. 15 in. person who weight 180 lb. (b) Determine your own height and weight in SI units. 40

41 Assignment Write a user-define program for calculating your CPA and CGPA for every semester. Input of the program can be either mark or grade Evaluation Criteria: Convergence: Creativity: Output/Results: User friendly program 41

Computer Programming ECIV 2303 Chapter 6 Programming in MATLAB Instructor: Dr. Talal Skaik Islamic University of Gaza Faculty of Engineering

Computer Programming ECIV 2303 Chapter 6 Programming in MATLAB Instructor: Dr. Talal Skaik Islamic University of Gaza Faculty of Engineering Computer Programming ECIV 2303 Chapter 6 Programming in MATLAB Instructor: Dr. Talal Skaik Islamic University of Gaza Faculty of Engineering 1 Introduction A computer program is a sequence of computer

More information

Chapter 7: Programming in MATLAB

Chapter 7: Programming in MATLAB The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Computer Programming (ECIV 2302) Chapter 7: Programming in MATLAB 1 7.1 Relational and Logical Operators == Equal to ~=

More information

CS 115 Exam 1, Fall 2015 Thu. 09/24/2015

CS 115 Exam 1, Fall 2015 Thu. 09/24/2015 CS 115 Exam 1, Fall 2015 Thu. 09/24/2015 Name: Section: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this

More information

function [s p] = sumprod (f, g)

function [s p] = sumprod (f, g) Outline of the Lecture Introduction to M-function programming Matlab Programming Example Relational operators Logical Operators Matlab Flow control structures Introduction to M-function programming M-files:

More information

Branches, Conditional Statements

Branches, Conditional Statements Branches, Conditional Statements Branches, Conditional Statements A conditional statement lets you execute lines of code if some condition is met. There are 3 general forms in MATLAB: if if/else if/elseif/else

More information

PART 2 DEVELOPING M-FILES

PART 2 DEVELOPING M-FILES PART 2 DEVELOPING M-FILES Presenter: Dr. Zalilah Sharer 2018 School of Chemical and Energy Engineering Universiti Teknologi Malaysia 17 September 2018 Topic Outcomes Week Topic Topic Outcomes 6-8 Creating

More information

AP Computer Science. if/else, return values. Copyright 2010 by Pearson Education

AP Computer Science. if/else, return values. Copyright 2010 by Pearson Education AP Computer Science if/else, return values The if statement Executes a block of statements only if a test is true statement;... statement; Example: double gpa = console.nextdouble(); if (gpa >= 2.0) {

More information

Chapter 4: Programming with MATLAB

Chapter 4: Programming with MATLAB Chapter 4: Programming with MATLAB Topics Covered: Programming Overview Relational Operators and Logical Variables Logical Operators and Functions Conditional Statements For Loops While Loops Debugging

More information

Lecture 4: Conditionals

Lecture 4: Conditionals Lecture 4: Conditionals Building Java Programs: A Back to Basics Approach by Stuart Reges and Marty Stepp Copyright (c) Pearson 2013. All rights reserved. Type boolean Type boolean boolean: A logical type

More information

LECTURE NOTES ON PROGRAMMING FUNDAMENTAL USING C++ LANGUAGE

LECTURE NOTES ON PROGRAMMING FUNDAMENTAL USING C++ LANGUAGE Department of Software The University of Babylon LECTURE NOTES ON PROGRAMMING FUNDAMENTAL USING C++ LANGUAGE By Collage of Information Technology, University of Babylon, Iraq Samaher_hussein@yahoo.com

More information

Creating New Variables in JMP Datasets Using Formulas Exercises

Creating New Variables in JMP Datasets Using Formulas Exercises Creating New Variables in JMP Datasets Using Formulas Exercises Exercise 3 Calculate the Difference of Two Columns 1. This Exercise will use the data table Cholesterol. This data table contains the following

More information

Software Reliability and Reusability CS614

Software Reliability and Reusability CS614 Software Reliability and Reusability CS614 Assiut University Faculty of Computers & Information Quality Assurance Unit Software Reliability and Reusability Course Specifications2011-2012 Relevant program

More information

A GREATER GOODS BRAND

A GREATER GOODS BRAND A GREATER GOODS BRAND 1 2 3 Physical Features Measuring Units lb. kg pound kilogram Setting The Measuring Unit By pressing the UNIT button on the back of the scale, you can switch between lb. (pound) and

More information

COSC 236 Section 101 Computer Science 1 -- Prof. Michael A. Soderstrand

COSC 236 Section 101 Computer Science 1 -- Prof. Michael A. Soderstrand COSC 236 Section 101 Computer Science 1 -- Prof. Michael A. Soderstrand COSC 236 Web Site You will always find the course material at: http://www.class-notes.us or http://www.class-notes.info or http://www.lecture-notes.tripod.com

More information

Risk Factor Electronic System (RFES) Quick User s Guide

Risk Factor Electronic System (RFES) Quick User s Guide Copyright 2012 13 The University of Texas Pan American Border Health Office 1 Texas Risk Assessment for Type 2 Diabetes in Children Risk Factor Electronic System Homepage You can access the RFES website

More information

Structure Array 1 / 50

Structure Array 1 / 50 Structure Array A structure array is a data type that groups related data using data containers called fields. Each field can contain any type of data. Access data in a structure using dot notation of

More information

Part A: Course Outline

Part A: Course Outline University of Macau Faculty of Science and Technology Course Title: Department of Electrical and Computer Engineering Part A: Course Outline Communication System and Data Network Course Code: ELEC460 Year

More information

Dr. Khaled Al-Qawasmi

Dr. Khaled Al-Qawasmi Al-Isra University Faculty of Information Technology Department of CS Programming Mathematics using MATLAB 605351 Dr. Khaled Al-Qawasmi ١ Dr. Kahled Al-Qawasmi 2010-2011 Chapter 3 Selection Statements

More information

CSE111 Introduction to Computer Applications

CSE111 Introduction to Computer Applications CSE111 Introduction to Computer Applications Lecture 0 Organizational Issues Prepared By Asst. Prof. Dr. Samsun M. BAŞARICI Course Title Introduction to Computer Applications Course Type 1. Compulsory

More information

Anatomy of a Function. Pick a Name. Parameters. Definition. Chapter 20: Thinking Big: Programming Functions

Anatomy of a Function. Pick a Name. Parameters. Definition. Chapter 20: Thinking Big: Programming Functions Chapter 20: Thinking Big: Programming Functions Fluency with Information Technology Third Edition by Lawrence Snyder Anatomy of a Function Functions are packages for algorithms 3 parts Name Parameters

More information

B. Subject-specific skills B1. Problem solving skills: Supply the student with the ability to solve different problems related to the topics

B. Subject-specific skills B1. Problem solving skills: Supply the student with the ability to solve different problems related to the topics Zarqa University Faculty: Information Technology Department: Computer Science Course title: Programming LAB 1 (1501111) Instructor: Lecture s time: Semester: Office Hours: Course description: This introductory

More information

Control Structures. March 1, Dr. Mihail. (Dr. Mihail) Control March 1, / 28

Control Structures. March 1, Dr. Mihail. (Dr. Mihail) Control March 1, / 28 Control Structures Dr. Mihail March 1, 2015 (Dr. Mihail) Control March 1, 2015 1 / 28 Overview So far in this course, MATLAB programs consisted of a ordered sequence of mathematical operations, functions,

More information

Boolean Logic & Branching Lab Conditional Tests

Boolean Logic & Branching Lab Conditional Tests I. Boolean (Logical) Operations Boolean Logic & Branching Lab Conditional Tests 1. Review of Binary logic Three basic logical operations are commonly used in binary logic: and, or, and not. Table 1 lists

More information

Lecture 5 Tao Wang 1

Lecture 5 Tao Wang 1 Lecture 5 Tao Wang 1 Objectives In this chapter, you will learn about: Selection criteria Relational operators Logical operators The if-else statement Nested if statements C++ for Engineers and Scientists,

More information

A GREATER GOODS BRAND

A GREATER GOODS BRAND A GREATER GOODS BRAND 1 Symbol for THE OPERATION GUIDE MUST BE READ Symbol for TYPE BF APPLIED PARTS Symbol for MANUFACTURE DATE Symbol for SERIAL NUMBER Symbol for MANUFACTURER Symbol for DIRECT CURRENT

More information

Programming in MATLAB Part 2

Programming in MATLAB Part 2 Programming in MATLAB Part 2 A computer program is a sequence of computer commands. In a simple program the commands are executed one after the other in the order they are typed. MATLAB provides several

More information

Lecture 11: Logical Functions & Selection Structures CMPSC 200 Programming for Engineers with MATLAB

Lecture 11: Logical Functions & Selection Structures CMPSC 200 Programming for Engineers with MATLAB Lecture 11: Logical Functions & Selection Structures CMPSC 2 Programming for Engineers with MATLAB Brad Sottile Fall 214 Slide 2 of 3 Midterm 1 Details You must bring your PSU student ID card Scantron

More information

Programming for Experimental Research. Flow Control

Programming for Experimental Research. Flow Control Programming for Experimental Research Flow Control FLOW CONTROL In a simple program, the commands are executed one after the other in the order they are typed. Many situations require more sophisticated

More information

CS 221 Lecture. Tuesday, 11 October 2011

CS 221 Lecture. Tuesday, 11 October 2011 CS 221 Lecture Tuesday, 11 October 2011 "Computers in the future may weigh no more than 1.5 tons." - Popular Mechanics, forecasting the relentless march of science, 1949. Today s Topics 1. Announcements

More information

4 Decision making in programs

4 Decision making in programs Chapter 4: Decision making in programs 89 4 Decision making in programs Many computer programs require decisions to be made, depending on the data entered. In this chapter we will develop some programs

More information

Module Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2015-16 PROGRAMMING FOR APPLICATIONS CMP-4009B Time allowed: 2 hours Section A (Attempt all questions: 80 marks) Section

More information

Chapter 4 Branching Statements & Program Design

Chapter 4 Branching Statements & Program Design EGR115 Introduction to Computing for Engineers Branching Statements & Program Design from: S.J. Chapman, MATLAB Programming for Engineers, 5 th Ed. 2016 Cengage Learning Topics Introduction: Program Design

More information

ENGINEERING PROGRAMMING

ENGINEERING PROGRAMMING ENGINEERING PROGRAMMING MS in Earth Science Engineering Semester 1, 2018/19 COURSE COMMUNICATION FOLDER University of Miskolc Faculty of Earth Science and Engineering Institute of Geophysics and Geoinformatics

More information

ENGR 1181 MATLAB 09: For Loops 2

ENGR 1181 MATLAB 09: For Loops 2 ENGR 1181 MATLAB 09: For Loops Learning Objectives 1. Use more complex ways of setting the loop index. Construct nested loops in the following situations: a. For use with two dimensional arrays b. For

More information

BSc (Hons) Software Engineering (FT) - IC320

BSc (Hons) Software Engineering (FT) - IC320 BSc (Hons) Software Engineering (FT) - IC320 1. Context and Objectives The BSc Software Engineering degree concentrates more on the skills needed for a career in the software industry by focusing on the

More information

1. Word Analysis: (Which nouns suggest a need for memory (a variable) and which verbs suggest a need for action (a function maybe).

1. Word Analysis: (Which nouns suggest a need for memory (a variable) and which verbs suggest a need for action (a function maybe). Program 3 Seven Step Problem Solving Methodology Skeleton Problem Statement for Body Mass Index Program Enhancement: Design a program that calculates a person s body mass index (BMI). The BMI is often

More information

CSCI 3300 Assignment 4

CSCI 3300 Assignment 4 Austin Peay State University, Tennessee Fall 2016 CSCI 3300: Introduction to Web Development Dr. Leong Lee CSCI 3300 Assignment 4 Total estimated time for this assignment: 7 hours When you see Richard

More information

Selection Statements

Selection Statements Selection Statements 1 Introduction Matlab has two basic selection statements: the if statement and the switch statement. The if statement has optional else and elseif. The relational/comparison and logical

More information

Introduction to C++ (using Microsoft Visual C++)

Introduction to C++ (using Microsoft Visual C++) Introduction to C++ (using Microsoft Visual C++) By the end of this section, the students should be able to: Understand the basics of C++ programs and its development environment. Develop a simple C++

More information

Building Java Programs

Building Java Programs Building Java Programs Chapter 4 Lecture 4-1: if and if/else Statements reading: 4.2 self-check: #4-5, 7, 10, 11 exercises: #7 videos: Ch. 4 #2-4 Loops with if/else if/else statements can be used with

More information

Review for Programming Exam and Final May 4-9, Ribbon with icons for commands Quick access toolbar (more at lecture end)

Review for Programming Exam and Final May 4-9, Ribbon with icons for commands Quick access toolbar (more at lecture end) Review for Programming Exam and Final Larry Caretto Mechanical Engineering 209 Computer Programming for Mechanical Engineers May 4-9, 2017 Outline Schedule Excel Basics VBA Editor and programming variables

More information

Model 4.2 Faculty member + student Course syllabus for Advanced programming language - CS313D

Model 4.2 Faculty member + student Course syllabus for Advanced programming language - CS313D Model 4.2 Faculty member + student Course syllabus for Advanced programming language - CS1D 1. Faculty member information: Name of faculty member responsible for the course Dr. Myriam Hadjouni Office Hours

More information

Returns & if/else. Parameters and Objects

Returns & if/else. Parameters and Objects Returns & if/else Parameters and Objects Subset of the Supplement Lesson slides from: Building Java Programs, Chapter 3 & 4 by Stuart Reges and Marty Stepp (http://www.buildingjavaprograms.com/ ) & thanks

More information

Selection Statements

Selection Statements Selection Statements by Ahmet Sacan selection statements, branching statements, condition, relational expression, Boolean expression, logical expression, relational operators, logical operators, truth

More information

Question. Insight Through

Question. Insight Through Intro Math Problem Solving October 10 Question about Accuracy Rewrite Square Root Script as a Function Functions in MATLAB Road Trip, Restaurant Examples Writing Functions that Use Lists Functions with

More information

MATLAB TUTORIAL WORKSHEET

MATLAB TUTORIAL WORKSHEET MATLAB TUTORIAL WORKSHEET What is MATLAB? Software package used for computation High-level programming language with easy to use interactive environment Access MATLAB at Tufts here: https://it.tufts.edu/sw-matlabstudent

More information

SME1013 PROGRAMMING FOR ENGINEERS

SME1013 PROGRAMMING FOR ENGINEERS SME1013 PROGRAMMING FOR ENGINEERS Ainullotfi bin Abdul Latif Faculty of Mechanical Engineering UTM Problem Solving Recognise and understand the problem (what is it that needed to be solved?) List the parameters

More information

MATLAB MATLAB - Lecture # 8. Programming in MATLAB / Chapter 7. if end if-else end if-elseif-else end

MATLAB MATLAB - Lecture # 8. Programming in MATLAB / Chapter 7. if end if-else end if-elseif-else end MATLAB - Lecture # 8 Programming in MATLAB / Chapter 7 Topics Covered:. Relational and Logical Operators 2. Conditional statements. if if- if-if- INTRODUCTION TO PROGRAMMING 63-64 In a simple program the

More information

Course Name: Database Systems - 1 Course Code: IS211

Course Name: Database Systems - 1 Course Code: IS211 Course Name: Database Systems - 1 Course Code: IS211 I. Basic Course Information Major or minor element of program: General Department offering the course: Information Systems Department Academic level:

More information

CS 221 Lecture. Tuesday, 4 October There are 10 kinds of people in this world: those who know how to count in binary, and those who don t.

CS 221 Lecture. Tuesday, 4 October There are 10 kinds of people in this world: those who know how to count in binary, and those who don t. CS 221 Lecture Tuesday, 4 October 2011 There are 10 kinds of people in this world: those who know how to count in binary, and those who don t. Today s Agenda 1. Announcements 2. You Can Define New Functions

More information

Building Java Programs

Building Java Programs Building Java Programs Chapter 4 Lecture 4-2: Advanced if/else; Cumulative sum; reading: 4.2, 4.4-4.5 2 Advanced if/else reading: 4.4-4.5 Factoring if/else code factoring: Extracting common/redundant code.

More information

Course Name: Computer Networks-1 Course Code: IT222

Course Name: Computer Networks-1 Course Code: IT222 Course Name: Computer Networks-1 Course Code: IT222 I. Basic Course Information Major or minor element of program: General Department offering the course: Information Technology Department Academic level:

More information

Course Name: Database Design Course Code: IS414

Course Name: Database Design Course Code: IS414 Course Name: Database Design Course Code: IS414 I. Basic Course Information Major or minor element of program: Both Major Minor Department offering the course: Information Systems Department Academic level:

More information

Advanced Database Organization INF613

Advanced Database Organization INF613 Advanced Database Organization INF613 Assiut University Faculty of Computers & Information Quality Assurance Unit Advanced Database Organization Course Specifications 2010-2011 Relevant program Master

More information

BEng (Hons) Chemical Engineering (Minor: Energy Engineering) E403 (Under Review)

BEng (Hons) Chemical Engineering (Minor: Energy Engineering) E403 (Under Review) BEng (Hons) Chemical (Minor: Energy ) E403 (Under Review) 1. Introduction Chemical engineering is a broad based discipline that extends to numerous areas of technology and development. Chemical engineers

More information

7 Control Structures, Logical Statements

7 Control Structures, Logical Statements 7 Control Structures, Logical Statements 7.1 Logical Statements 1. Logical (true or false) statements comparing scalars or matrices can be evaluated in MATLAB. Two matrices of the same size may be compared,

More information

Surface Area and Volume

Surface Area and Volume 8 Surface Area and Volume 8. Three-Dimensional Figures 8. Surface Areas of Prisms 8. Surface Areas of Pyramids 8. Volumes of Rectangular Prisms I petitioned my owner for a doghouse with greater volume.

More information

Prof. Dr. A. Podelski, Sommersemester 2017 Dr. B. Westphal. Softwaretechnik/Software Engineering

Prof. Dr. A. Podelski, Sommersemester 2017 Dr. B. Westphal. Softwaretechnik/Software Engineering Prof. Dr. A. Podelski, Sommersemester 2017 Dr. B. Westphal Softwaretechnik/Software Engineering http://swt.informatik.uni-freiburg.de/teaching/ss2017/swtvl Exercise Sheet 6 Early submission: Wednesday,

More information

Lab 2: Introduction to mydaq and LabView

Lab 2: Introduction to mydaq and LabView Lab 2: Introduction to mydaq and LabView Lab Goals: Learn about LabView Programming Tools, Debugging and Handling Errors, Data Types and Structures, and Execution Structures. Learn about Arrays, Controls

More information

BEng (Hons) Mechanical Engineering - E440 (Under Review)

BEng (Hons) Mechanical Engineering - E440 (Under Review) BEng (Hons) Mechanical Engineering - E440 (Under Review) 1.0 Introduction Mechanical Engineering is the historical root of engineering practice. It gave its name to the realm of technology-based problem-solving,

More information

BSc (Hons) Software Engineering (FT) - IC320

BSc (Hons) Software Engineering (FT) - IC320 BSc (Hons) Software Engineering (FT) - IC320 1. Introduction The BSc Software Engineering degree concentrates more on the skills needed for a career in the software industry by focusing on the process

More information

Relational & Logical Operators, Selection Statements

Relational & Logical Operators, Selection Statements Relational & Logical Operators, Selection Statements by Ahmet Sacan selection statements, branching statements, condition, relational expression, Boolean expression, logical expression, relational operators,

More information

COURSE SYLLABUS BMIS 662 TELECOMMUNICATIONS AND NETWORK SECURITY

COURSE SYLLABUS BMIS 662 TELECOMMUNICATIONS AND NETWORK SECURITY BMIS 662 Note: Course content may be changed, term to term, without notice. The information below is provided as a guide for course selection and is not binding in any form, and should not be used to purchase

More information

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS INTRODUCTION TO PROBLEM SOLVING Introduction to Problem Solving Understanding problems Data processing Writing an algorithm CONTINUE.. Tool

More information

Measures of Dispersion

Measures of Dispersion Lesson 7.6 Objectives Find the variance of a set of data. Calculate standard deviation for a set of data. Read data from a normal curve. Estimate the area under a curve. Variance Measures of Dispersion

More information

H.C. Chen 1/24/2019. Chapter 4. Branching Statements and Program Design. Programming 1: Logical Operators, Logical Functions, and the IF-block

H.C. Chen 1/24/2019. Chapter 4. Branching Statements and Program Design. Programming 1: Logical Operators, Logical Functions, and the IF-block Chapter 4 Branching Statements and Program Design Programming 1: Logical Operators, Logical Functions, and the IF-block Learning objectives: 1. Write simple program modules to implement single numerical

More information

Administrative - Master Syllabus COVER SHEET

Administrative - Master Syllabus COVER SHEET Administrative - Master Syllabus COVER SHEET Purpose: It is the intention of this Administrative-Master Syllabus to provide a general description of the course, outline the required elements of the course

More information

Solutions to: Unit Conversions and Significant Figures Problem Set S.E. Van Bramer (9/10/96)

Solutions to: Unit Conversions and Significant Figures Problem Set S.E. Van Bramer (9/10/96) Solutions to: Unit Conversions and Significant Figures Problem Set S.E. Van Bramer (9/10/96) 1. Conversions: Express the following in the units asked for: a. Speed of light, 3.00 x 10 8 m s -1, in les

More information

University of Engineering and Technology, Taxila Department of Civil Engineering

University of Engineering and Technology, Taxila Department of Civil Engineering University of Engineering and Technology, Taxila Department of Civil Engineering Course Title: Pre-requisite(s): Computer Applications (HU-210) Theory + Lab None Credit Hours: 2 + 2 Contact Hours: 2 +

More information

Geometric Probabiltiy

Geometric Probabiltiy Geometric Probabiltiy Reteaching 101 Math Course 3, Lesson 101 Geometric Probability: The probability based on the area of the regions Probability = Formula: area of included region area of known region

More information

COURSE NUMBER: ISS 214 COURSE NAME: Connecting Networks - Cisco 4 SEMESTER CREDIT HOURS: 4. https://www.netacad.com/

COURSE NUMBER: ISS 214 COURSE NAME: Connecting Networks - Cisco 4 SEMESTER CREDIT HOURS: 4. https://www.netacad.com/ HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD 21015 Course Outline Connecting Networks [CISCO 4] COURSE NUMBER: COURSE NAME: Connecting Networks - 4 DIVISION: Business, Computing & Applied

More information

COURSE PLAN Regulation: R11 FACULTY DETAILS: Department::

COURSE PLAN Regulation: R11 FACULTY DETAILS: Department:: 203-4 COURSE PLAN Regulation: R FACULTY DETAILS: Name of the Faculty:: Designation: Department:: ROSHAN KAVURI Associate Professor IT COURSE DETAILS Name Of The Programme:: B.TECH Batch:: 202 Designation::

More information

Problem Solving FLOWCHART. by Noor Azida Binti Sahabudin Faculty of Computer Systems & Software Engineering

Problem Solving FLOWCHART. by Noor Azida Binti Sahabudin Faculty of Computer Systems & Software Engineering Problem Solving FLOWCHART by Noor Azida Binti Sahabudin Faculty of Computer Systems & Software Engineering azida@ump.edu.my OER Problem Solving by Noor Azida Binti Sahabudin work is under licensed Creative

More information

Computer Networks IT321

Computer Networks IT321 Computer Networks IT321 CS Program 3 rd Year (2 nd Semester) Page 1 Assiut University Faculty of Computers & Information Computer Science Department Quality Assurance Unit Computer Networks Course Specifications

More information

MGA Developing Interactive Systems (5 ECTS), spring 2017 (16 weeks)

MGA Developing Interactive Systems (5 ECTS), spring 2017 (16 weeks) MGA 672 - Developing Interactive Systems (5 ECTS), spring 2017 (16 weeks) Lecturer: Ilja Šmorgun ilja.smorgun@idmaster.eu, Sónia Sousa sonia.sousa@idmaster.eu Contact Details: All email communication regarding

More information

C/C++ Programming for Engineers: Matlab Branches and Loops

C/C++ Programming for Engineers: Matlab Branches and Loops C/C++ Programming for Engineers: Matlab Branches and Loops John T. Bell Department of Computer Science University of Illinois, Chicago Review What is the difference between a script and a function in Matlab?

More information

COURSE OUTLINE. Course lecturer(s) Name Office Tel (07-55) Dr Norsham Idris N /

COURSE OUTLINE. Course lecturer(s) Name Office Tel (07-55)  Dr Norsham Idris N / COURSE OUTLINE Software Engineering/Computing Page: 1 of 7 Course code: SCSJ2154 Academic Session/Semester: 2017//2 Course synopsis Course coordinator This course presents the concepts of object orientation

More information

G COURSE PLAN ASSISTANT PROFESSOR Regulation: R13 FACULTY DETAILS: Department::

G COURSE PLAN ASSISTANT PROFESSOR Regulation: R13 FACULTY DETAILS: Department:: G COURSE PLAN FACULTY DETAILS: Name of the Faculty:: Designation: Department:: Abhay Kumar ASSOC PROFESSOR CSE COURSE DETAILS Name Of The Programme:: BTech Batch:: 2013 Designation:: ASSOC PROFESSOR Year

More information

21-Loops Part 2 text: Chapter ECEGR 101 Engineering Problem Solving with Matlab Professor Henry Louie

21-Loops Part 2 text: Chapter ECEGR 101 Engineering Problem Solving with Matlab Professor Henry Louie 21-Loops Part 2 text: Chapter 6.4-6.6 ECEGR 101 Engineering Problem Solving with Matlab Professor Henry Louie While Loop Infinite Loops Break and Continue Overview Dr. Henry Louie 2 WHILE Loop Used to

More information

Computer Programming

Computer Programming Computer Programming Dr. Deepak B Phatak Dr. Supratik Chakraborty Department of Computer Science and Engineering Session: for statement in C++ Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 1 Quick Recap

More information

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving)

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving) DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW Evaluation Scheme & Syllabus For B.Tech. First Year (Programming for Problem Solving) On Choice Based Credit System (Effective from the Session: 2018-19)

More information

M. Tech. (Power Electronics and Power System) (Semester I) Course Plan for Each Week (Hrs)

M. Tech. (Power Electronics and Power System) (Semester I) Course Plan for Each Week (Hrs) No. 3 Advanced Power Electronics Computer Application in Power System Modelling and Analysis of Electrical Machines M. Tech. (Power Electronics and Power System) (Semester I) Plan for Each Week (Hrs) Credits

More information

COURSE OUTLINE. Course code: SCSR 4473 Academic Session/Semester: /2. Course name: Security Management Pre/co requisite (course name

COURSE OUTLINE. Course code: SCSR 4473 Academic Session/Semester: /2. Course name: Security Management Pre/co requisite (course name COURSE OUTLINE Department/ Computer Science/Computing Page: 1 of 5 Course synopsis The subject is aimed at imparting knowledge and skill sets required to assume the overall responsibilities of administration

More information

Final Examination Semester 2 / Year 2005

Final Examination Semester 2 / Year 2005 Southern College Kolej Selatan 南方学院 Final Examination Semester 2 / Year 2005 COURSE : INTRODUCTION TO COMPUTING COURSE CODE : CSEG 1003 TIME : 2 1/2 HOURS DEPARTMENT : ELECTRICAL & ELECTRONIC ENGINEERING

More information

Python - Week 3. Mohammad Shokoohi-Yekta

Python - Week 3. Mohammad Shokoohi-Yekta Python - Week 3 Mohammad Shokoohi-Yekta 1 Objective To solve mathematic problems by using the functions in the math module To represent and process strings and characters To use the + operator to concatenate

More information

Practice with Functions

Practice with Functions CptS 111 Lab # Practice with Functions Learning Objectives: Be able to define functions Be able to call functions Be able to pass arguments into functions Be able to return values from functions Be able

More information

download instant at Introduction to C++

download instant at  Introduction to C++ Introduction to C++ 2 Programming: Solutions What s in a name? that which we call a rose By any other name would smell as sweet. William Shakespeare When faced with a decision, I always ask, What would

More information

Class 8 ALGORITHMS AND FLOWCHARTS. The City School

Class 8 ALGORITHMS AND FLOWCHARTS. The City School Class 8 ALGORITHMS AND FLOWCHARTS ALGORITHMS AND FLOWCHARTS A typical programming task can be divided into two phases: Problem solving phase produce an ordered sequence of steps that describe solution

More information

Encapsulation in Java

Encapsulation in Java Encapsulation in Java EECS2030: Advanced Object Oriented Programming Fall 2017 CHEN-WEI WANG Encapsulation (1.1) Consider the following problem: A person has a name, a weight, and a height. A person s

More information

BEng (Hons) Civil Engineering E410 (Under Review)

BEng (Hons) Civil Engineering E410 (Under Review) BEng (Hons) Civil Engineering E410 (Under Review) 1.0 Introduction The aim of the degree programme is to provide students with a sound knowledge and understanding of the subject of Civil Engineering and

More information

Tanita Health Ware Help

Tanita Health Ware Help Tanita Health Ware Help Getting Started Managing Users Measurements Analysis Graphs Files & Sharing Exporting ANT Scale Installation Using Garmin Watches Bluetooth Scale Installation Getting Started The

More information

1. Query and manipulate data with Entity Framework.

1. Query and manipulate data with Entity Framework. COLLEGE OF INFORMATION TECHNOLOGY DEPARTMENT OF MULTIMEDIA SCIENCE COURSE SYLLABUS/SPECIFICATION CODE & TITLE: ITMS 434 Developing Windows Azure and Web Services (MCSD 20486) WEIGHT: 2-2-3 PREREQUISITE:

More information

Chapter 5. Conditions, Logical Expressions, and Selection Control Structures

Chapter 5. Conditions, Logical Expressions, and Selection Control Structures Chapter 5 Conditions, Logical Expressions, and Selection Control Structures Data Type bool Chapter 5 Topics Using Relational and Logical Operators to Construct and Evaluate Logical Expressions If-Then-Else

More information

Chapter 5 Topics. Chapter 5 Topics. Flow of Control. bool Data Type. Flow of Control. Chapter 5

Chapter 5 Topics. Chapter 5 Topics. Flow of Control. bool Data Type. Flow of Control. Chapter 5 1 Chapter 5 Topics Data Type bool Chapter 5 Conditions, Logical Expressions, and Selection Control Structures Using Relational and Logical Operators to Construct and Evaluate Logical Expressions If-Then-Else

More information

Introduction to Matlab. By: Hossein Hamooni Fall 2014

Introduction to Matlab. By: Hossein Hamooni Fall 2014 Introduction to Matlab By: Hossein Hamooni Fall 2014 Why Matlab? Data analytics task Large data processing Multi-platform, Multi Format data importing Graphing Modeling Lots of built-in functions for rapid

More information

Syllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE1303. B.Tech. Year - II

Syllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE1303. B.Tech. Year - II Subject Code: 01CE1303 Subject Name: Object Oriented Design and Programming B.Tech. Year - II Objective: The objectives of the course are to have students identify and practice the object-oriented programming

More information

1) As a logical statement, is 1 considered true or false in MATLAB? Explain your answer.

1) As a logical statement, is 1 considered true or false in MATLAB? Explain your answer. ENGR 1181 Midterm 2+ Review Note: This practice material does not contain actual test questions or represent the format of the final. The first 20 questions should be completed WITHOUT using MATLAB. This

More information

Introduction to. second print. Copyright HKTA Tang Hin Memorial Secondary School

Introduction to. second print. Copyright HKTA Tang Hin Memorial Secondary School Introduction to 1 VISUAL BASIC 2016 edition second print Copyright HKTA Tang Hin Memorial Secondary School 2016-17 Table of Contents. Preface....................................................... Chapter.......

More information

Part A - Structured Essay Answer all four questions on this paper itself.

Part A - Structured Essay Answer all four questions on this paper itself. General Certificate of Education (Adv. Level) Examination, August 2016 New Syllabus Information & Communication Technology II 20 E II Three hours Important: This question paper comprises of two parts,

More information

Syllabus for HPE 034 Varsity Cheerleading and Fitness 1 Credit Hour Fall 2014

Syllabus for HPE 034 Varsity Cheerleading and Fitness 1 Credit Hour Fall 2014 I. COURSE DESCRIPTIONS Syllabus for HPE 034 Varsity Cheerleading and Fitness 1 Credit Hour Fall 2014 Designed only for the student who is a member of the ORU varsity cheerleaders, yell leaders, dance squad,

More information