Mathematical Functions, Characters, and Strings. APSC 160 Chapter 4

Size: px
Start display at page:

Download "Mathematical Functions, Characters, and Strings. APSC 160 Chapter 4"

Transcription

1 Mathematical Functins, Characters, and Strings APSC 160 Chapter 4 1

2 Objectives T slve mathematics prblems by using the C++ mathematical functins (4.2) T represent characters using the char type (4.3) T encde characters using ASCII cde (4.3.1) T read a character frm the keybard (4.3.2) T represent special characters using the escape sequences (4.3.3) T cast a numeric value t a character and cast a character t an integer (4.3.4) T cmpare and test characters (4.3.5) T test and cnvert characters using the C++ character functins (4.6) T cnvert a hexadecimal character t a decimal value (4.7) 2

3 Objectives T represent strings using the string type and intrduce bjects and instance functins (4.8) T use the subscript peratr fr accessing and mdifying characters in a string (4.8.1) T use the + peratr t cncatenate strings (4.8.2) T cmpare strings using the relatinal peratrs (4.8.3) T read strings frm the keybard (4.8.4) T frmat utput using stream manipulatrs (4.10) T read/write data frm/t a file (4.11) 3

4 Intrductin This chapter intrduces functins fr perfrming cmmn mathematical peratins Because strings are frequently used in prgramming, it is beneficial t intrduce them early s that yu can begin t use them t develp useful prgrams 4

5 Mathematical Functins A functin is a grup f statements that perfrms a specific task pw(a, b) functin t cmpute a b rand() functin t generate a randm number Header <cmath> declares a set f functins t cmpute cmmn mathematical peratins and transfrmatins This sectin intrduces trignmetric functins and expnent functins 5

6 Trignmetric Functins Assume PI is a cnstant with value , then: sin(0) returns 0.0 cs(pi / 6) returns sin(270 * PI / 180) returns -1.0 cs(pi / 2) returns 0 sin(pi / 6) returns 0.5 asin(0.5) returns (same as π/6) sin(pi / 2) returns 1.0 acs(0.5) returns (same as π/3) cs(0) returns 1.0 atan(1.0) returns (same as π/4) Functin sin(radians) cs(radians) tan(radians) asin(a) acs(a) atan(a) Descriptin Returns the trignmetric sine f an angle in radians Returns the trignmetric csine f an angle in radians Returns the trignmetric tangent f an angle in radians Returns the angle in radians fr the inverse f sine Returns the angle in radians fr the inverse f sine Returns the angle in radians fr the inverse f sine 6

7 Expnent Functins Assume E is a cnstant with value , then: exp(1.0) returns lg(e) returns 1.0 lg10(10.0) returns 1.0 pw(2.0, 3) returns 8.0 sqrt(4.0) returns 2.0 Functin Descriptin exp(x) Returns e raised t pwer f x (e x ) lg(x) Returns the natural lgarithm f x (ln(x) = lg e x) lg10(x) Returns the base 10 lgarithm f x (lg 10 x) pw(a, b) Returns a raised t the pwer f b (a b ) sqrt(x) Returns the square rt f x ( x) fr x >= 0 7

8 Runding Functins Examples: ceil(2.1) returns 3.0 ceil(2.0) returns 2.0 ceil(-2.0) returns -2.0 ceil(-2.1) returns -2.0 flr(2.1) returns 2.0 flr(2.0) returns 2.0 flr(-2.0) returns 2.0 flr(-2.1) returns -3.0 Functin ceil(x) flr(x) Descriptin x is runded up t its nearest integer. This integer is returned as a duble value x is runded dwn t its nearest integer. This integer is returned as a duble value 8

9 min, max, and abs Functins max and min are defined in algrithm and abs in cstdlib headers Examples: max(2, 3) returns 3 max(2.5, 3.0) returns 3.0 min(2.5, 4.6) returns 2.5 abs(-2) returns 2 abs(-2.1) returns 2.1 9

10 Character Data Type The character data type, char, is used t represent a single character A character literal is enclsed in single qutatin marks char letter = 'A'; //assigns character A t the char variable letter char numchar = '4'; //assigns digit character 4 t the char variable numchar A string literal must be enclsed in qutatin marks (" ") A character literal is a single character enclsed in single qutatin marks (' ') "A" is a string and 'A' is a character On mst systems, the size f the char type is 1 byte 10

11 Escape Sequences An escape sequence cnsists f a backslash (\) fllwed by a character r a cmbinatin f digits The characters ' ', '\t', '\f', '\r', and '\n' are knwn as the whitespace characters Escape Sequence Name \b Backspace \t Tab \n Linefeed \f Frmfeed \r Carriage Return \\ Backslash \ Duble Qute 11

12 Casting Char and Numeric Types When an integer is cast int a char, nly its lwer 8 bits f data are used; the ther part is ignred char c = 0XFF41; // The lwer 8 bits hex cde 41 is assigned t c cut << c; // variable c is character A When a flating-pint value is cast int a char, the flating-pint value is first cast int an int, which is then cast int a char char c = 65.25; // 65 is assigned t variable c cut << c; // variable c is character A When a char is cast int a numeric type, the character s ASCII is cast int the specified numeric type int i = 'A'; // The ASCII cde f character A is assigned t i cut << i; // variable i is 65 12

13 Casting Char and Numeric Types The char type is treated as if it were an integer f the byte size All numeric peratrs can be applied t char perands A char perand is autmatically cast int a number if the ther perand is a number r a character // The ASCII cde fr '2' is 50 and fr '3' is 51 int i = '2' + '3'; cut << "i is " << i << endl; int j = 2 + 'a'; // The ASCII cde fr 'a' is 97 cut << "j is " << j << endl; cut << j << " is the ASCII cde fr character " << static_cast<char>(j) << endl; The result is: i is 101 j is is the ASCII cde fr character c 13

14 T Uppercase 1 #include <istream> 2 using namespace std; 3 4 int main() 5 { 6 cut << "Enter a lwercase letter: "; 7 char lwercaseletter; 8 cin >> lwercaseletter; 9 10 char uppercaseletter = 11 static_cast<char>('a' + (lwercaseletter - 'a')); cut << "The crrespnding uppercase letter is " 14 << uppercaseletter << endl; return 0; 17 } 14

15 Character Functins Functin isdigit(ch) isalpha(ch) isalnum(ch) islwer(ch) isupper(ch) isspace(ch) tlwer(ch) tupper(ch) Descriptin Returns true if the specified character is a digit. Returns true if the specified character is a letter. Returns true if the specified character is a letter r digit. Returns true if the specified character is a lwercase letter. Returns true if the specified character is an uppercase letter. Returns true if the specified character is a whitespace character. Returns the lwercase f the specified character. Returns the uppercase f the specified character. 15

16 Hex t Decimal 1 #include <istream> 2 #include <cctype> 3 using namespace std; 4 5 int main() 6 { 7 cut << "Enter a hex digit: "; 8 char hexdigit; 9 cin >> hexdigit; hexdigit = tupper(hexdigit); 12 if (hexdigit <= 'F' && hexdigit >= 'A') 13 { 14 int value = 10 + hexdigit - 'A'; 15 cut << "The decimal value fr hex digit " 16 << hexdigit << " is " << value << endl; 17 } 16

17 Hex t Decimal 18 else if (isdigit(hexdigit)) 19 { 20 cut << "The decimal value fr hex digit " 21 << hexdigit << " is " << hexdigit << endl; 22 } 23 else 24 { 25 cut << hexdigit << " is an invalid input" << endl; 26 } return 0; 29 } 17

18 string Type The char type represents nly ne character T represent a string f characters, use the data type called string string message = "Prgramming is fun"; Include the <string> header file t use the string type Example string s = "Bttm"; cut << s.length() << endl; cut << s.at(0) << endl; cut << s.at(1) << endl; Functin length() size() at(index) Descriptin Returns the number f characters in this string. Same as length(). Returns the character at the specified index frm this string. 18

19 String Index and Subscript Operatr The index fr the first character in the string is 0 The subscript peratr t access the character at a specified index in a string stringname[index] string s = "ABCD"; s[0] = 'P'; //replaces A cut << s[0] << endl; //displays P cut << s[1] << endl; //displays B The + and += peratrs are used fr cncatenating tw strings string s3 = s1 + s2; string message = "Welcme t C++" message += " and prgramming is fun"; string s = "ABC"; s += 'D'; //The new s is "ABCD" 19

20 Cmparing Strings Relatinal peratrs are used t cmpare tw strings by cmparing their crrespnding characters ne by ne frm left t right string s1 = "ABC"; string s2 = "ABE"; cut << (s1 == s2) << endl; // Displays 0 (means false) cut << (s1!= s2) << endl; // Displays 1 (means true) cut << (s1 > s2) << endl; // Displays 0 (means false) cut << (s1 >= s2) << endl; // Displays 0 (means false) cut << (s1 < s2) << endl; // Displays 1 (means true) cut << (s1 <= s2) << endl; // Displays 1 (means true) 20

21 Reading Strings A string can be read frm the keybard using the cin bject string city; cut << "Enter a city: "; cin >> city; // Read t string city cut << "Yu entered " << city << endl; getline functin in the string header file, reads a string frm the keybard using the fllwing syntax: getline(cin, s, delimitcharacter) string city; cut << "Enter a city: "; getline(cin, city, '\n'); // Same as getline(cin, city) cut << "Yu entered " << city << endl; 21

22 Frmatting Cnsle Output Yu can use the stream manipulatrs t display frmatted utput n the cnsle Frmatting functins are called stream manipulatrs and are included in the imanip header file Example duble amunt = ; duble interestrate = ; duble interest = amunt * interestrate; cut << "Interest is " << fixed << setprecisin(2) << interest << endl; //displays

23 Stream Manipulatrs Operatr setprecisin(n) fixed shwpint setw(width) left right Descriptin sets the precisin f a flating-pint number displays flating-pint numbers in fixed-pint ntatin causes a flating-pint number t be displayed with a decimal pint with trailing zers even if it has n fractinal part specifies the width f a print field justifies the utput t the left justifies the utput t the right 23

24 Stream Manipulatrs setprecisin(n) specifies the ttal number f digits displayed fr a flatingpint number duble number = ; cut << setprecisin(3) << number << " " << setprecisin(4) << number << " " << setprecisin(5) << number << " " << setprecisin(6) << number << endl; displays setprecisin remains in effect until the precisin is changed duble number = ; cut << setprecisin(3) << number << " "; cut << << " " << << " " << << endl; displays

25 Stream Manipulatrs fixed frces the number t be displayed in nnscientific ntatin with a fixed number f digits after the decimal pint (default is 6) cut << fixed << ; displays Instead f e+08 Use setprecisin(n) after fixed t specify the number f digits after decimal pint duble mnthlypayment = ; duble ttalpayment = ; cut << fixed << setprecisin(2) << mnthlypayment << endl << ttalpayment << endl; displays

26 Stream Manipulatrs shwpint tgether with the setprecisin is used t frce the flating-pint numbers t be displayed with a decimal pint and a fixed number f digits after the decimal pint cut << setprecisin(6); cut << 1.23 << endl; cut << shwpint << 1.23 << endl; cut << shwpint << << endl; displays

27 Stream Manipulatrs cut uses just the number f the psitins needed fr an utput setw(width) is used t specify the minimum number f clumns fr an utput cut << setw(8) << "C++" << setw(6) << 101 << endl; cut << setw(8) << "Java" << setw(6) << 101 << endl; cut << setw(8) << "HTML" << setw(6) << 101 << endl; displays 8 6 C Java 101 HTML 101 If an item requires mre spaces than the specified width, the width is autmatically increased cut << setw(8) << "Prgramming " << setw(2) << 101; displays Prgramming

28 Stream Manipulatrs The left manipulatr is used t left-justify the utput and the right manipulatr is used t right-justify the utput cut << right; cut << setw(8) << 1.23 << endl; cut << setw(8) << << endl; displays cut << left; cut << setw(8) << 1.23 << endl; cut << setw(8) << << endl; displays

29 Simple File Input and Output Yu can save data t a file and read data frm the file T write data t a file, first declare a variable f the fstream type fstream utput; T specify a file, invke the pen functin frm utput bject utput.pen("numbers.txt"); This statement creates a file named numbers.txt Or create a file utput bject and pen the file in ne statement fstream utput("numbers.txt"); After yu are dne with the file, invke the clse functin utput.clse(); 29

30 Simple File Input and Output T read data frm a file, first declare a variable f the ifstream type ifstream input; T specify a file, invke the pen functin frm input input.pen("numbers.txt"); This statement pens a file named numbers.txt The file shuld be in the wrking directry (alng with the surce file) Or create a file input bject and pen the file in ne statement ifstream input("numbers.txt"); After yu are dne with the file, invke the clse functin input.clse(); 30

31 Simple File Output 1 #include <istream> 2 #include <fstream> 3 using namespace std; 4 5 int main() 6 { 7 fstream utput; 8 9 // Create a file 10 utput.pen("numbers.txt"); // Write numbers 13 utput << 95 << " " << 56 << " " << 34; // clse file 16 utput.clse(); cut << "Dne" << endl; return 0; 21 } 31

32 Simple File Input 1 #include <istream> 2 #include <fstream> 3 using namespace std; 4 5 int main() 6 { 7 ifstream input; 8 9 // Open a file 10 input.pen("numbers.txt"); int scre1, scre2, scre3; // Read data 15 input >> scre1; 16 input >> scre2; 17 input >> scre3; cut << "Ttal scre is " << scre1+scre2+scre3 << endl; // Clse file 22 input.clse(); cut << "Dne" << endl; return 0; 27 } 32

CS1150 Principles of Computer Science Math Functions, Characters and Strings

CS1150 Principles of Computer Science Math Functions, Characters and Strings CS1150 Principles f Cmputer Science Math Functins, Characters and Strings Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Mathematical Functins Java

More information

CS1150 Principles of Computer Science Midterm Review

CS1150 Principles of Computer Science Midterm Review CS1150 Principles f Cmputer Science Midterm Review Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Office hurs 10/15, Mnday, 12:05 12:50pm 10/17, Wednesday

More information

CS1150 Principles of Computer Science Introduction (Part II)

CS1150 Principles of Computer Science Introduction (Part II) Principles f Cmputer Science Intrductin (Part II) Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang UC. Clrad Springs Review Terminlgy Class } Every Java prgram must have at least

More information

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2 UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2012 Lab 1 - Calculatr Intrductin In this lab yu will be writing yur first

More information

Relational Operators, and the If Statement. 9.1 Combined Assignments. Relational Operators (4.1) Last time we discovered combined assignments such as:

Relational Operators, and the If Statement. 9.1 Combined Assignments. Relational Operators (4.1) Last time we discovered combined assignments such as: Relatinal Operatrs, and the If Statement 9/18/06 CS150 Intrductin t Cmputer Science 1 1 9.1 Cmbined Assignments Last time we discvered cmbined assignments such as: a /= b + c; Which f the fllwing lng frms

More information

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2 Iterative Code Design handout Style Guidelines handout

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2 Iterative Code Design handout Style Guidelines handout UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2013 Lab 1 - Calculatr Intrductin Reading Cncepts In this lab yu will be

More information

Computer Organization and Architecture

Computer Organization and Architecture Campus de Gualtar 4710-057 Braga UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA Departament de Infrmática Cmputer Organizatin and Architecture 5th Editin, 2000 by William Stallings Table f Cntents I. OVERVIEW.

More information

CS1150 Principles of Computer Science Methods

CS1150 Principles of Computer Science Methods CS1150 Principles f Cmputer Science Methds Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Opening Prblem Find the sum f integers frm 1 t 10, frm 20

More information

CS1150 Principles of Computer Science Methods

CS1150 Principles of Computer Science Methods CS1150 Principles f Cmputer Science Methds Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Passing Parameters public static vid nprintln(string message,

More information

Lab 4. Name: Checked: Objectives:

Lab 4. Name: Checked: Objectives: Lab 4 Name: Checked: Objectives: Learn hw t test cde snippets interactively. Learn abut the Java API Practice using Randm, Math, and String methds and assrted ther methds frm the Java API Part A. Use jgrasp

More information

CS1150 Principles of Computer Science Final Review

CS1150 Principles of Computer Science Final Review CS1150 Principles f Cmputer Science Final Review Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Numerical Data Types Name Range Strage Size byte 2 7

More information

Structure Query Language (SQL)

Structure Query Language (SQL) Structure Query Language (SQL) 1. Intrductin SQL 2. Data Definitin Language (DDL) 3. Data Manipulatin Language ( DML) 4. Data Cntrl Language (DCL) 1 Structured Query Language(SQL) 6.1 Intrductin Structured

More information

1 Binary Trees and Adaptive Data Compression

1 Binary Trees and Adaptive Data Compression University f Illinis at Chicag CS 202: Data Structures and Discrete Mathematics II Handut 5 Prfessr Rbert H. Slan September 18, 2002 A Little Bttle... with the wrds DRINK ME, (r Adaptive data cmpressin

More information

Programming in C/C++ Lecture 1

Programming in C/C++ Lecture 1 Prgramming in C/C++ Lecture 1 http://few.vu.nl/~nsilvis/c++/2007 Natalia Silvis-Cividjian e-mail: nsilvis@few.vu.nl vrije Universiteit amsterdam Outline Abut C/C++ language Abut this curse Getting started

More information

Chapter 2. Outline. Simple C++ Programs

Chapter 2. Outline. Simple C++ Programs Chapter 2 Simple C++ Programs Outline Objectives 1. Building C++ Solutions with IDEs: Dev-cpp, Xcode 2. C++ Program Structure 3. Constant and Variables 4. C++ Operators 5. Standard Input and Output 6.

More information

Engineering Problem Solving with C++, Etter/Ingber

Engineering Problem Solving with C++, Etter/Ingber Engineering Problem Solving with C++, Etter/Ingber Chapter 2 Simple C++ Programs C++, Second Edition, J. Ingber 1 Simple C++ Programs Program Structure Constants and Variables C++ Operators Standard Input

More information

CS1150 Principles of Computer Science Loops

CS1150 Principles of Computer Science Loops CS1150 Principles f Cmputer Science Lps Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Annuncement HW1 graded HW2 due tnight HW3 will be psted sn Due

More information

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II)

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II) CS1150 Principles f Cmputer Science Blean, Selectin Statements (Part II) Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 Review What s the scientific ntatin f 9,200,000?

More information

Reading and writing data in files

Reading and writing data in files Reading and writing data in files It is ften very useful t stre data in a file n disk fr later reference. But hw des ne put it there, and hw des ne read it back? Each prgramming language has its wn peculiar

More information

Flying into Trig on a Paper Plate

Flying into Trig on a Paper Plate Flying int Trig n a Paper Plate Warm-up: 1. Label the quadrants:. Classify the fllwing angles as btuse, acute r right: a) b) 91 c) 90 d) 18. Add the fllwing fractins (withut a calculatr!) a) + 5 b) 1 8

More information

The cin Object. cout << "Enter the length and the width of the rectangle? "; cin >> length >> width;

The cin Object. cout << Enter the length and the width of the rectangle? ; cin >> length >> width; The cin Object Short for console input. It is used to read data typed at the keyboard. Must include the iostream library. When this instruction is executed, it waits for the user to type, it reads the

More information

CS-201 Introduction to Programming with Java

CS-201 Introduction to Programming with Java CS-201 Introduction to Programming with Java California State University, Los Angeles Computer Science Department Lecture V: Mathematical Functions, Characters, and Strings Introduction How would you estimate

More information

Eastern Mediterranean University School of Computing and Technology Information Technology Lecture2 Functions

Eastern Mediterranean University School of Computing and Technology Information Technology Lecture2 Functions Eastern Mediterranean University Schl f Cmputing and Technlgy Infrmatin Technlgy Lecture2 Functins User Defined Functins Why d we need functins? T make yur prgram readable and rganized T reduce repeated

More information

Chapter-10 INHERITANCE

Chapter-10 INHERITANCE Chapter-10 INHERITANCE Intrductin: Inheritance is anther imprtant aspect f bject riented prgramming. C++ allws the user t create a new class (derived class) frm an existing class (base class). Inheritance:

More information

Solving Problems with Trigonometry

Solving Problems with Trigonometry Cnnectins Have yu ever... Slving Prblems with Trignmetry Mdeled a prblem using a right triangle? Had t find the height f a flagple r clumn? Wndered hw far away a helicpter was? Trignmetry can be used t

More information

Introduction to functions in C

Introduction to functions in C Intrductin t functins in C Lecture Tpics Intrductin t functins in C Overview f C standard library Lecture materials Textbk 14.1, 14.2, 14.4 SP16 1 V. Kindratenk Intrductin t functins in C A functin in

More information

Objectives. Topic 8: Input, Interaction, & Introduction to callbacks. Input Devices. Project Sketchpad. Introduce the basic input devices

Objectives. Topic 8: Input, Interaction, & Introduction to callbacks. Input Devices. Project Sketchpad. Introduce the basic input devices Tpic 8 Input, Interactin, & Intr. t Callbacks Tpic 8: Input, Interactin, & Intrductin t callbacks Tpic 8 Input, Interactin, & Intr. t Callbacks Objectives Intrduce the basic input devices Physical Devices

More information

DECISION CONTROL CONSTRUCTS IN JAVA

DECISION CONTROL CONSTRUCTS IN JAVA DECISION CONTROL CONSTRUCTS IN JAVA Decisin cntrl statements can change the executin flw f a prgram. Decisin cntrl statements in Java are: if statement Cnditinal peratr switch statement If statement The

More information

What is the ratio between the sides (leg:leg:hypotenuse)? What do all the triangles have in common (angle measures)?

What is the ratio between the sides (leg:leg:hypotenuse)? What do all the triangles have in common (angle measures)? Accelerated Precalculus Name Right Triangle Trig Basics August 23, 2018 Recall Special Right Triangles Use the Pythagrean Therem t slve fr the missing side(s). Leave final answers in simplest radical frm.

More information

Simple Regression in Minitab 1

Simple Regression in Minitab 1 Simple Regressin in Minitab 1 Belw is a sample data set that we will be using fr tday s exercise. It lists the heights & weights fr 10 men and 12 wmen. Male Female Height (in) 69 70 65 72 76 70 70 66 68

More information

COP2800 Homework #3 Assignment Spring 2013

COP2800 Homework #3 Assignment Spring 2013 YOUR NAME: DATE: LAST FOUR DIGITS OF YOUR UF-ID: Please Print Clearly (Blck Letters) YOUR PARTNER S NAME: DATE: LAST FOUR DIGITS OF PARTNER S UF-ID: Please Print Clearly Date Assigned: 15 February 2013

More information

Design Patterns. Collectional Patterns. Session objectives 11/06/2012. Introduction. Composite pattern. Iterator pattern

Design Patterns. Collectional Patterns. Session objectives 11/06/2012. Introduction. Composite pattern. Iterator pattern Design Patterns By Võ Văn Hải Faculty f Infrmatin Technlgies HUI Cllectinal Patterns Sessin bjectives Intrductin Cmpsite pattern Iteratr pattern 2 1 Intrductin Cllectinal patterns primarily: Deal with

More information

MATHEMATICAL FUNCTIONS CHARACTERS, AND STRINGS. INTRODUCTION IB DP Computer science Standard Level ICS3U

MATHEMATICAL FUNCTIONS CHARACTERS, AND STRINGS. INTRODUCTION IB DP Computer science Standard Level ICS3U C A N A D I A N I N T E R N A T I O N A L S C H O O L O F H O N G K O N G MATHEMATICAL FUNCTIONS CHARACTERS, AND STRINGS P1 LESSON 4 P1 LESSON 4.1 INTRODUCTION P1 LESSON 4.2 COMMON MATH FUNCTIONS Java

More information

Programming Project: Building a Web Server

Programming Project: Building a Web Server Prgramming Prject: Building a Web Server Submissin Instructin: Grup prject Submit yur cde thrugh Bb by Dec. 8, 2014 11:59 PM. Yu need t generate a simple index.html page displaying all yur grup members

More information

Access 2000 Queries Tips & Techniques

Access 2000 Queries Tips & Techniques Access 2000 Queries Tips & Techniques Query Basics The query is the basic tl that Access prvides fr retrieving infrmatin frm yur database. Each query functins like a questin that can be asked immediately

More information

Common Language Runtime

Common Language Runtime Intrductin t.net framewrk.net is a general-purpse sftware develpment platfrm, similar t Java. Micrsft intrduced.net with purpse f bridging gap between different applicatins..net framewrk aims at cmbining

More information

Operations. Making Things Happen

Operations. Making Things Happen Operations Making Things Happen Object Review and Continue Lecture 1 2 Object Categories There are three kinds of objects: Literals: unnamed objects having a value (0, -3, 2.5, 2.998e8, 'A', "Hello\n",...)

More information

INSTALLING CCRQINVOICE

INSTALLING CCRQINVOICE INSTALLING CCRQINVOICE Thank yu fr selecting CCRQInvice. This dcument prvides a quick review f hw t install CCRQInvice. Detailed instructins can be fund in the prgram manual. While this may seem like a

More information

3.1. Chapter 3: The cin Object. Expressions and Interactivity

3.1. Chapter 3: The cin Object. Expressions and Interactivity Chapter 3: Expressions and Interactivity 3.1 The cin Object Copyright 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-1 The cin Object Standard input stream object, normally the keyboard,

More information

Project 3 Specification FAT32 File System Utility

Project 3 Specification FAT32 File System Utility Prject 3 Specificatin FAT32 File System Utility Assigned: Octber 30, 2015 Due: Nvember 30, 11:59 pm, 2015 Yu can use the reminder f the slack days. -10 late penalty fr each 24-hur perid after the due time.

More information

Data Structure Interview Questions

Data Structure Interview Questions Data Structure Interview Questins A list f tp frequently asked Data Structure interview questins and answers are given belw. 1) What is Data Structure? Explain. Data structure is a way that specifies hw

More information

Using CppSim to Generate Neural Network Modules in Simulink using the simulink_neural_net_gen command

Using CppSim to Generate Neural Network Modules in Simulink using the simulink_neural_net_gen command Using CppSim t Generate Neural Netwrk Mdules in Simulink using the simulink_neural_net_gen cmmand Michael H. Perrtt http://www.cppsim.cm June 24, 2008 Cpyright 2008 by Michael H. Perrtt All rights reserved.

More information

Lab 0: Compiling, Running, and Debugging

Lab 0: Compiling, Running, and Debugging UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2012 Lab 0: Cmpiling, Running, and Debugging Intrductin Reading This is the

More information

$ARCSIGHT_HOME/current/user/agent/map. The files are named in sequential order such as:

$ARCSIGHT_HOME/current/user/agent/map. The files are named in sequential order such as: Lcatin f the map.x.prperties files $ARCSIGHT_HOME/current/user/agent/map File naming cnventin The files are named in sequential rder such as: Sme examples: 1. map.1.prperties 2. map.2.prperties 3. map.3.prperties

More information

c++ keywords: ( all lowercase ) Note: cin and cout are NOT keywords.

c++ keywords: ( all lowercase ) Note: cin and cout are NOT keywords. Chapter 1 File Extensions: Source code (cpp), Object code (obj), and Executable code (exe). Preprocessor processes directives and produces modified source Compiler takes modified source and produces object

More information

Creating a TES Encounter/Transaction Entry Batch

Creating a TES Encounter/Transaction Entry Batch Creating a TES Encunter/Transactin Entry Batch Overview Intrductin This mdule fcuses n hw t create batches fr transactin entry in TES. Charges (transactins) are entered int the system in grups called batches.

More information

CS1150 Principles of Computer Science Introduction

CS1150 Principles of Computer Science Introduction Principles f Cmputer Science Intrductin Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang UC. Clrad Springs Intr f Intr Yanyan Zhuang PhD in netwrk systems yzhuang@uccs.edu Office

More information

Vijaya Nallari -Math 8 SOL TEST STUDY GUIDE

Vijaya Nallari -Math 8 SOL TEST STUDY GUIDE Name Perid SOL Test Date Vijaya Nallari -Math 8 SOL TEST STUDY GUIDE Highlighted with RED is Semester 1 and BLUE is Semester 2 8.1- Simplifying Expressins and Fractins, Decimals, Percents, and Scientific

More information

IMPORTING INFOSPHERE DATA ARCHITECT MODELS INFORMATION SERVER V8.7

IMPORTING INFOSPHERE DATA ARCHITECT MODELS INFORMATION SERVER V8.7 IMPORTING INFOSPHERE DATA ARCHITECT MODELS INFORMATION SERVER V8.7 Prepared by: March Haber, march@il.ibm.cm Last Updated: January, 2012 IBM MetaData Wrkbench Enablement Series Table f Cntents: Table f

More information

API Gateway Version September Visual Mapper User Guide

API Gateway Version September Visual Mapper User Guide API Gateway Versin 7.5.2 19 September 2017 Visual Mapper User Guide Cpyright 2017 Axway All rights reserved. This dcumentatin describes the fllwing Axway sftware: Axway API Gateway 7.5.2 N part f this

More information

o,... ,... It) IBM 5110 Basic Reference,Manual

o,... ,... It) IBM 5110 Basic Reference,Manual ---- - ----- --_ - - -.- IBM 5110 Basic Reference,Manual,...,... It) Preface This manual cntains specific infrmatin abut the IBM 5110 Cmputer and its BASIC prgramming capability. Prerequisite Publicatin

More information

Systems & Operating Systems

Systems & Operating Systems McGill University COMP-206 Sftware Systems Due: Octber 1, 2011 n WEB CT at 23:55 (tw late days, -5% each day) Systems & Operating Systems Graphical user interfaces have advanced enugh t permit sftware

More information

Edit Directly in Cells. Fast Navigation with Control button. Fill Handle. Use AutoCorrect to speed up data entry

Edit Directly in Cells. Fast Navigation with Control button. Fill Handle. Use AutoCorrect to speed up data entry 2017 WASBO Accunting Cnference Micrsft Excel - Quick Tips That Can Save a Bundle f Time March 16, 2017 Edit Directly in Cells Allws user t duble-click t edit cells. If turned ff, Excel navigates t the

More information

Relius Documents ASP Checklist Entry

Relius Documents ASP Checklist Entry Relius Dcuments ASP Checklist Entry Overview Checklist Entry is the main data entry interface fr the Relius Dcuments ASP system. The data that is cllected within this prgram is used primarily t build dcuments,

More information

UNIT 7 RIGHT ANGLE TRIANGLES

UNIT 7 RIGHT ANGLE TRIANGLES UNIT 7 RIGHT ANGLE TRIANGLES Assignment Title Wrk t cmplete Cmplete Cmplete the vcabulary wrds n Vcabulary the attached handut with infrmatin frm the bklet r text. 1 Triangles Labelling Triangles 2 Pythagrean

More information

Because this underlying hardware is dedicated to processing graphics commands, OpenGL drawing is typically very fast.

Because this underlying hardware is dedicated to processing graphics commands, OpenGL drawing is typically very fast. The Open Graphics Library (OpenGL) is used fr visualizing 2D and 3D data. It is a multipurpse pen-standard graphics library that supprts applicatins fr 2D and 3D digital cntent creatin, mechanical and

More information

C++ Reference Material Programming Style Conventions

C++ Reference Material Programming Style Conventions C++ Reference Material Prgramming Style Cnventins What fllws here is a set f reasnably widely used C++ prgramming style cnventins. Whenever yu mve int a new prgramming envirnment, any cnventins yu have

More information

DS LABS DISTRIBUTED SYSTEMS PRACTICAL EXERCISES

DS LABS DISTRIBUTED SYSTEMS PRACTICAL EXERCISES DS LABS DISTRIBUTED SYSTEMS PRACTICAL EXERCISES Java Streams and TCP Sckets Jsé María F Mrán, 2013 Creative Cmmns License 9 OCTUBRE 2013 1 JAVA SOCKETS (TCP) 7 web server 7 firefx Applicatins Applicatins

More information

TaiRox Mail Merge. Running Mail Merge

TaiRox Mail Merge. Running Mail Merge TaiRx Mail Merge TaiRx Mail Merge TaiRx Mail Merge integrates Sage 300 with Micrsft Wrd s mail merge functin. The integratin presents a Sage 300 style interface frm within the Sage 300 desktp. Mail Merge

More information

Project #1 - Fraction Calculator

Project #1 - Fraction Calculator AP Cmputer Science Liberty High Schl Prject #1 - Fractin Calculatr Students will implement a basic calculatr that handles fractins. 1. Required Behavir and Grading Scheme (100 pints ttal) Criteria Pints

More information

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II)

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II) CS1150 Principles f Cmputer Science Blean, Selectin Statements (Part II) Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 Review What s the scientific ntatin f 9,200,000?

More information

BI Publisher TEMPLATE Tutorial

BI Publisher TEMPLATE Tutorial PepleSft Campus Slutins 9.0 BI Publisher TEMPLATE Tutrial Lessn T2 Create, Frmat and View a Simple Reprt Using an Existing Query with Real Data This tutrial assumes that yu have cmpleted BI Publisher Tutrial:

More information

Uploading Your Catalogue

Uploading Your Catalogue Uplading Yur Catalgue Creating a Catalgue A simple timed auctin catalgue shuld cntain fur kinds f infrmatin: Lt Number Descriptin Start Price Reserve The best way t frmat yur catalgue is t use Micrsft

More information

CS 151 Review #3. // More than one variable can be defined // in a statement. Multiple variables are // separated by a comma.

CS 151 Review #3. // More than one variable can be defined // in a statement. Multiple variables are // separated by a comma. REVIEW cout Statement The cout statement invokes an output stream, which is a sequence of characters to be displayed to the screen. cout

More information

Engineering Problem Solving with C++, 3e Chapter 2 Test Bank

Engineering Problem Solving with C++, 3e Chapter 2 Test Bank 1. Match each of the following data types with literal constants of that data type. A data type can be used more than once. A. integer B 1.427E3 B. double D "Oct" C. character B -63.29 D. string F #Hashtag

More information

Adverse Action Letters

Adverse Action Letters Adverse Actin Letters Setup and Usage Instructins The FRS Adverse Actin Letter mdule was designed t prvide yu with a very elabrate and sphisticated slutin t help autmate and handle all f yur Adverse Actin

More information

Objectives. OpenGL - Shaders. GLSL A Quick Review

Objectives. OpenGL - Shaders. GLSL A Quick Review OpenGL - Shaders CITS3003 Graphics & Animatin E. Angel and D. Shreiner: Interactive Cmputer Graphics 6E Addisn-Wesley 2012 1 Objectives The rendering pipeline and the shaders Data types, qualifiers, built-in

More information

The Reporting Tool. An Overview of HHAeXchange s Reporting Tool

The Reporting Tool. An Overview of HHAeXchange s Reporting Tool HHAeXchange The Reprting Tl An Overview f HHAeXchange s Reprting Tl Cpyright 2017 Hmecare Sftware Slutins, LLC One Curt Square 44th Flr Lng Island City, NY 11101 Phne: (718) 407-4633 Fax: (718) 679-9273

More information

INFOCUS Enrollment by Count Date

INFOCUS Enrollment by Count Date 0 INFOCUS Enrllment by Cunt Date Crsstab 11/5/2012 Sftware Technlgy, Inc. Thmas Murphy 0 Enrllment by Cunt Date Crsstab OBJECTIVES: A crsstab reprt that cunts enrlled and withdrawn students based n a cunt

More information

SMART Notebook 11.1 Maths Tools

SMART Notebook 11.1 Maths Tools SMART Ntebk 11.1 Maths Tls Windws perating systems User s guide Prduct registratin If yu register yur SMART prduct, we ll ntify yu f new features and sftware upgrades. Register nline at smarttech.cm/registratin.

More information

I/O Streams and Standard I/O Devices (cont d.)

I/O Streams and Standard I/O Devices (cont d.) Chapter 3: Input/Output Objectives In this chapter, you will: Learn what a stream is and examine input and output streams Explore how to read data from the standard input device Learn how to use predefined

More information

LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C

LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C Due: July 9 (Sun) 11:59 pm 1. Prblem A Subject: Structure declaratin, initializatin and assignment. Structure

More information

3 AXIS STAGE CONTROLLER

3 AXIS STAGE CONTROLLER CORTEX CONTROLLERS 50, St Stephen s Pl. Cambridge CB3 0JE Telephne +44(0)1223 368000 Fax +44(0)1223 462800 http://www.crtexcntrllers.cm sales@crtexcntrllers.cm 3 AXIS STAGE CONTROLLER Instructin Manual

More information

What s New in Banner 9 Admin Pages: Differences from Banner 8 INB Forms

What s New in Banner 9 Admin Pages: Differences from Banner 8 INB Forms 1 What s New in Banner 9 Admin Pages: Differences frm Banner 8 INB Frms Majr Changes: Banner gt a face-lift! Yur hme page is called Applicatin Navigatr and is the entry/launch pint t all pages Banner is

More information

Preparation: Follow the instructions on the course website to install Java JDK and jgrasp on your laptop.

Preparation: Follow the instructions on the course website to install Java JDK and jgrasp on your laptop. Lab 1 Name: Checked: (instructr r TA initials) Objectives: Learn abut jgrasp - the prgramming envirnment that we will be using (IDE) Cmpile and run a Java prgram Understand the relatinship between a Java

More information

Querying Data with Transact SQL

Querying Data with Transact SQL Querying Data with Transact SQL Curse Cde: 20761 Certificatin Exam: 70-761 Duratin: 5 Days Certificatin Track: MCSA: SQL 2016 Database Develpment Frmat: Classrm Level: 200 Abut this curse: This curse is

More information

MIPS Architecture and Assembly Language Overview

MIPS Architecture and Assembly Language Overview MIPS Architecture and Assembly Language Overview Adapted frm: http://edge.mcs.dre.g.el.edu/gicl/peple/sevy/architecture/mipsref(spim).html [Register Descriptin] [I/O Descriptin] Data Types and Literals

More information

California Common Core Content Standards: Math 9-12 Geometry

California Common Core Content Standards: Math 9-12 Geometry Califrnia Cmmn Cre Cntent Standards: Math 9-12 Gemetry 9-12.G Gemetry 9-12.G-CO Cngruence 9-12. Experiment with transfrmatins in the plane 9-12.G-CO.1 Knw precise definitins f angle, circle, perpendicular

More information

MATH PRACTICE EXAM 2 (Sections 2.6, , )

MATH PRACTICE EXAM 2 (Sections 2.6, , ) MATH 1050-90 PRACTICE EXAM 2 (Sectins 2.6, 3.1-3.5, 7.1-7.6) The purpse f the practice exam is t give yu an idea f the fllwing: length f exam difficulty level f prblems Yur actual exam will have different

More information

Bike MS My Account Guide

Bike MS My Account Guide Bike MS My Accunt Guide Utilize the tls available thrugh My Accunt! A custmizable My Accunt is available t each registered participant t help with recruiting and fundraising. Tls within My Accunt include:

More information

1. Overview: Solving first-degree equations, second-degree equations.

1. Overview: Solving first-degree equations, second-degree equations. UNIT 1: TRIGONOMETRY Nte: When yu cme acrss a wrd in green, yu can see its translatin int Spanish in a brief vcabulary at the end f the unit. 0. Intrductin Trignmetry deals with prblems in which yu have

More information

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash UiPath Autmatin Walkthrugh Walkthrugh Calculate Client Security Hash Walkthrugh Calculate Client Security Hash Start with the REFramewrk template. We start ff with a simple implementatin t demnstrate the

More information

REPORT WRITER USER S GUIDE

REPORT WRITER USER S GUIDE Ingenuity Dcumentatin REPORT WRITER USER S GUIDE Ingenuity v2.0.2 1 August, 2013 All ideas and infrmatin cntained within these dcuments are the intellectual prperty rights f Infinisurce. These dcuments

More information

Acrbat XI - Gespatial PDFs Abut gespatial PDFs A gespatial PDF cntains infrmatin that is required t gereference lcatin data. When gespatial data is imprted int a PDF, Acrbat retains the gespatial crdinates.

More information

1. Match each of the following data types with literal constants of that data type. A data type can be used more than once. A.

1. Match each of the following data types with literal constants of that data type. A data type can be used more than once. A. Engineering Problem Solving With C++ 4th Edition Etter TEST BANK Full clear download (no error formating) at: https://testbankreal.com/download/engineering-problem-solving-with-c-4thedition-etter-test-bank/

More information

EASTERN ARIZONA COLLEGE Visual Basic Programming I

EASTERN ARIZONA COLLEGE Visual Basic Programming I EASTERN ARIZONA COLLEGE Visual Basic Prgramming I Curse Design 2015-2016 Curse Infrmatin Divisin Business Curse Number CMP 121 Title Visual Basic Prgramming I Credits 3 Develped by Lydia Mata Lecture/Lab

More information

TRAINING GUIDE. Lucity Mobile

TRAINING GUIDE. Lucity Mobile TRAINING GUIDE The Lucity mbile app gives users the pwer f the Lucity tls while in the field. They can lkup asset infrmatin, review and create wrk rders, create inspectins, and many mre things. This manual

More information

Paraben s Phone Recovery Stick

Paraben s Phone Recovery Stick Paraben s Phne Recvery Stick v. 3.0 User manual Cntents Abut Phne Recvery Stick... 3 What s new!... 3 System Requirements... 3 Applicatin User Interface... 4 Understanding the User Interface... 4 Main

More information

Ascii Art Capstone project in C

Ascii Art Capstone project in C Ascii Art Capstne prject in C CSSE 120 Intrductin t Sftware Develpment (Rbtics) Spring 2010-2011 Hw t begin the Ascii Art prject Page 1 Prceed as fllws, in the rder listed. 1. If yu have nt dne s already,

More information

BANNER BASICS. What is Banner? Banner Environment. My Banner. Pages. What is it? What form do you use? Steps to create a personal menu

BANNER BASICS. What is Banner? Banner Environment. My Banner. Pages. What is it? What form do you use? Steps to create a personal menu BANNER BASICS What is Banner? Definitin Prduct Mdules Self-Service-Fish R Net Lg int Banner Banner Envirnment The Main Windw My Banner Pages What is it? What frm d yu use? Steps t create a persnal menu

More information

The Login Page Designer

The Login Page Designer The Lgin Page Designer A new Lgin Page tab is nw available when yu g t Site Cnfiguratin. The purpse f the Admin Lgin Page is t give fundatin staff the pprtunity t build a custm, yet simple, layut fr their

More information

Introduction to CS111 Part 2: Big Ideas

Introduction to CS111 Part 2: Big Ideas What is Cmputer Science? Intrductin t CS111 Part 2: Big Ideas CS111 Cmputer Prgramming Department f Cmputer Science Wellesley Cllege It s nt really abut cmputers. It s nt really a science. It s abut imperative

More information

User Guide Version v2015.1

User Guide Version v2015.1 2015 Exag Inc. All rights reserved. User Guide Versin v2015.1 Exag Reprting is a registered trademark f Exag, Inc. Windws is a registered trademark f Micrsft Crpratin in the United States and ther cuntries.

More information

Xilinx Answer Xilinx PCI Express DMA Drivers and Software Guide

Xilinx Answer Xilinx PCI Express DMA Drivers and Software Guide Xilinx Answer 65444 Xilinx PCI Express DMA Drivers and Sftware Guide Imprtant Nte: This dwnladable PDF f an Answer Recrd is prvided t enhance its usability and readability. It is imprtant t nte that Answer

More information

Week 2: Console I/O and Operators Arithmetic Operators. Integer Division. Arithmetic Operators. Gaddis: Chapter 3 (2.14,3.1-6,3.9-10,5.

Week 2: Console I/O and Operators Arithmetic Operators. Integer Division. Arithmetic Operators. Gaddis: Chapter 3 (2.14,3.1-6,3.9-10,5. Week 2: Console I/O and Operators Gaddis: Chapter 3 (2.14,3.1-6,3.9-10,5.1) CS 1428 Fall 2014 Jill Seaman 1 2.14 Arithmetic Operators An operator is a symbol that tells the computer to perform specific

More information

ME Week 5 Project 2 ilogic Part 1

ME Week 5 Project 2 ilogic Part 1 1 Intrductin t ilgic 1.1 What is ilgic? ilgic is a Design Intelligence Capture Tl Supprting mre types f parameters (string and blean) Define value lists fr parameters. Then redefine value lists autmatically

More information

OASIS SUBMISSIONS FOR FLORIDA: SYSTEM FUNCTIONS

OASIS SUBMISSIONS FOR FLORIDA: SYSTEM FUNCTIONS OASIS SUBMISSIONS FOR FLORIDA: SYSTEM FUNCTIONS OASIS SYSTEM FUNCTIONS... 2 ESTABLISHING THE COMMUNICATION CONNECTION... 2 ACCESSING THE OASIS SYSTEM... 3 SUBMITTING OASIS DATA FILES... 5 OASIS INITIAL

More information

Java Programming Course IO

Java Programming Course IO Java Prgramming Curse IO By Võ Văn Hải Faculty f Infrmatin Technlgies Industrial University f H Chi Minh City Sessin bjectives What is an I/O stream? Types f Streams Stream class hierarchy Cntrl flw f

More information

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash UiPath Autmatin Walkthrugh Walkthrugh Calculate Client Security Hash Walkthrugh Calculate Client Security Hash Start with the REFramewrk template. We start ff with a simple implementatin t demnstrate the

More information

CITI Technical Report 08-1 Parallel NFS Block Layout Module for Linux

CITI Technical Report 08-1 Parallel NFS Block Layout Module for Linux CITI Technical Reprt 08-1 Parallel NFS Blck Layut Mdule fr Linux William A. Adamsn, University f Michigan andrs@citi.umich.edu Frederic Isaman, University f Michigan iisaman@citi.umich.edu Jasn Glasgw,

More information