EEN118 22nd November These are my answers. Extra credit for anyone who spots a mistike. Except for that one. I did it on purpise.

Size: px
Start display at page:

Download "EEN118 22nd November These are my answers. Extra credit for anyone who spots a mistike. Except for that one. I did it on purpise."

Transcription

1 EEN118 22nd November 2011 These are my answers. Extra credit for anyone who spots a mistike. Except for that one. I did it on purpise.

2 5. An automatic animal monitoring device sits in the african savannah monitoring all the animals that pass within range. Throughout the day it creates a large text file that records all of its observations. At the end of the day that file is uploaded to a research base and analysed. The file has one line for each animal observed. Each line has the same format: first the time (in 24 hour form), then the species of the animal (a single word, using only lower case letters), then the direction it was heading (N, S, E, or W), then an estimate of its weight (in pounds), and finally an estimate of its speed (in miles per hour). Here is a sample from a typical file gorilla E gorilla E gorilla E zebra W lion W penguin S gorilla W It seems to show a family of gorillas strolling towards the rising sun, then shortly later a zebra chased by a lion going in the opposite direction, and then a small penguin flying south and one of the gorillas coming back. The name of the file is animals.txt. Write a function that processes this file and does the following things: + It must create a new file called gorillas.txt containing all the records of gorilla observations. + It must calculate the average weight of all the lions observed. + It must note the speed of the slowest gorilla seen heading east in the morning (time between 0000 and 1200). So if the sample data given above were the whole file, your function would create a gorillas.txt file containing 0530 gorilla E gorilla E gorilla E gorilla W And it would print for the user to see: Average lion weight pounds Slowest east-bound morning gorilla 2.8 mph

3 void main() { // a ifstream infile("animals.txt"); // b if (infile.fail()) { cout << "Can't read animals.txt\n"; exit(1); } // c ofstream gorfile("gorillas.txt"); // b again if (gorfile.fail()) { cout << "Can't write gorillas.txt\n"; exit(1); } // d double impossible_speed = ; double lion_sum = 0.0, slowest = impossible_speed; int num_lions = 0; // e while (true) { int time; string species, direction; double weight, speed; // f infile >> time >> species >> direction >> weight >> speed; // g if (infile.fail()) break; if (species=="gorilla") { // h gorfile << time << " " << species << " " << direction << " " << weight << " " << speed << "\n"; // j if (direction=="e" && time<1200 && speed<slowest) slowest = speed; } // i if (species=="lion") { lion_sum += weight; num_lions += 1; } } // k infile.close(); gorfile.close(); // m if (num_lions!= 0) // l cout << "Average lion weight " << lion_sum/num_lions << " pounds\n"; cout << "Average lion weight n/a because no lions were seen\n"; if (slowest!= impossible_speed) cout << "Slowest east-bound morning gorrilla " << slowest << " mph\n"; cout << "Slowest east-bound morning gorrilla n/a because none seen\n"; }

4 6. A struct (or object) to represent dates is to be implemented. It must contain a string for the day of the week, and three numbers for the day of the month, the month, and the year. a. Give the struct definition, along with a suitable set function for initialising a date, and a print function that prints one nicely. Using your definitions, I should be able to write this: date today, st_swithins_day; set(today, Tuesday, 22, 11, 2011); set(st_swithins_day, Friday, 15, 7, 2011); print(today); and when run, that code should print something very close to this Tuesday 22nd November 2011 or this Tuesday November 22nd 2011 b. Define a function called latest, which takes two dates as parameters, and returns as its result the one that is latest (i.e. comes second). So for example, this date x = latest(today, st_swithins_day); print(x) should also print today s date. c. Define a function called next, which takes one date as its parameter, and modifies that date by moving it on to the next day, so this would print next(today); print(today); next(today); print(today); Wednesday November 23rd 2011 Thursday November 24th 2011

5 a. Remember I said you could abbreviate reasonably, you would not have written all the strings. And of course there are millions of other ways of doing it, this is just the way I think is neatest. struct date { string dow; // short for day of week int d, m, y; }; void set(date & when, string dow_in, int d_in, int m_in, int y_in) { when.dow = dow_in; when.d = d_in; when.m = m_in; when.y = y_in; } string suffix[] = { "", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st" }; string month_name[] = { "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; void print(date when) { cout << when.dow << " " << when.d << suffix[when.d] << " " << month_name[when.m] << " " << when.y << "\n"; } b. date latest(date a, date b) { if (a.y > b.y) return a; if (b.y > a.y) return b; if (a.m > b.m) return a; if (b.m > a.m) return b; if (a.d > b.d) return a; return b; }

6 c. As with part a, you d abbreviate and it would be nice and small. int usual_days_in[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int leap_days_in[] = { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; bool isleap(int yr) { if (yr % 4 == 0) return true; return false; } void next(date & x) { x.d += 1; if (isleap(x.y)) { if (x.d > leap_days_in[x.m]) { x.d = 1; x.m += 1; } } { if (x.d > usual_days_in[x.m]) { x.d = 1; x.m += 1; } } if (x.m > 12) { x.m = 1; x.y += 1; } if (x.dow == "Monday") x.dow = "Tuesday"; if (x.dow == "Tuesday") x.dow = "Wednesday"; if (x.dow == "Wednesday") x.dow = "Thursday"; if (x.dow == "Thursday") x.dow = "Friday"; if (x.dow == "Friday") x.dow = "Saturday"; if (x.dow == "Saturday") x.dow = "Sunday"; if (x.dow == "Sunday") x.dow = "Monday"; }

7 7. Here is an attempt at sorting an array of ints so that they will appear in ascending order. It consists of a helper function that finds the largest int in an array, and a sorting function that repeatedly finds the largest int and moves it to the end of the array. Finally, there is a main() that tests it. int find_biggest(int A[1000] A,I ) { int biggest_so_far = 0; int pos = 0; while (pos<= J 1000 I ) { if (A[pos]>biggest_so_far) C biggest_so_far = A[pos]; pos = pos + 1; } B } int L swap(int D x, E y) { int t = x; y = t; F x = y; } void sort(int A[1000] A,H ) { int end_pos = 1000 J ; while (end_pos>0) { int big = find_biggest(a H,I ); swap(a[big], A[end_pos]); G } } void main() { int data[1000]; int number; cout << How many numbers are you going to type? ; cin >> number; cout << OK, now type them all\n ; for (int i = 0; i<number; i += 1) cin >> data[i]; sort(data[1000] H,K ); cout << Here they are sorted\n ; for (int i = 0; i<number; i += 1) cout << data[i] << \n ; } There is a lot wrong with this program. Tell me all the mistakes, and what must be done to fix them and make it work.

8 To make it easier on you, I ll tell you that there is nothing wrong with the input and output part, so don t waste time looking for mistakes in the parts with grey backgrounds. For this one, I ve marked the question with large red letters where the mistakes are, to connect to the explanations here. a. Don t say the size for array parameter. Just int A[] b. It says int biggest(...), but didn t return anything. c. Look at how sort uses this function. It must return the position of the biggest. d. Must be reference parameters, need & e. Both params need types: (int & x, int & y) f. This doesn t swap. Should be t=x; x=y; y=t; g. Infinite loop, need end_pos -= 1; h. number should be a param to both functions. int find_biggest(int A[], int N) void sort(int A[], int N) and in main: sort(data, number) i. This will keep finding the same biggest thing, should be find_biggest(a, end_pos-1) j. Array has elements [0] to [999], should be while (pos<n) and int end_pos = N-1; k. data is the name of the whole array, just say sort(data). Except for what I said for item h. l. Should be void, swap doesn t produce a value.

9 8. Draw a picture of a cat with a hat, or a hat with a cat, whichever you prefer. The cat s name is Dennis. * / \ =. = / ( ) / ( )/ ( _ )

EEN118 22nd November 2011

EEN118 22nd November 2011 EEN118 22nd November 2011 No Electronic Devices No Books or Notes No Panicking Name: Student number: Sign here if you did not give or receive aid in any form during this test, and did not consult any written

More information

Example. Section: PS 709 Examples of Calculations of Reduced Hours of Work Last Revised: February 2017 Last Reviewed: February 2017 Next Review:

Example. Section: PS 709 Examples of Calculations of Reduced Hours of Work Last Revised: February 2017 Last Reviewed: February 2017 Next Review: Following are three examples of calculations for MCP employees (undefined hours of work) and three examples for MCP office employees. Examples use the data from the table below. For your calculations use

More information

CLOVIS WEST DIRECTIVE STUDIES P.E INFORMATION SHEET

CLOVIS WEST DIRECTIVE STUDIES P.E INFORMATION SHEET CLOVIS WEST DIRECTIVE STUDIES P.E. 2018-19 INFORMATION SHEET INSTRUCTORS: Peggy Rigby peggyrigby@cusd.com 327-2104. Vance Walberg vancewalberg@cusd.com 327-2098 PURPOSE: Clovis West High School offers

More information

Scheduling. Scheduling Tasks At Creation Time CHAPTER

Scheduling. Scheduling Tasks At Creation Time CHAPTER CHAPTER 13 This chapter explains the scheduling choices available when creating tasks and when scheduling tasks that have already been created. Tasks At Creation Time The tasks that have the scheduling

More information

Institute For Arts & Digital Sciences SHORT COURSES

Institute For Arts & Digital Sciences SHORT COURSES Institute For Arts & Digital Sciences SHORT COURSES SCHEDULES AND FEES 2017 SHORT COURSES - GRAPHIC DESIGN Adobe Photoshop Basic 07 February 28 February Tuesdays 14:30-17:30 Adobe Photoshop Basic 07 February

More information

Basic Device Management

Basic Device Management This chapter contains the following sections: About, page 1 Licensing Requirements for, page 2 Default Settings for Basic Device Parameters, page 3 Changing the Device Hostname, page 3 Configuring the

More information

AIMMS Function Reference - Date Time Related Identifiers

AIMMS Function Reference - Date Time Related Identifiers AIMMS Function Reference - Date Time Related Identifiers This file contains only one chapter of the book. For a free download of the complete book in pdf format, please visit www.aimms.com Aimms 3.13 Date-Time

More information

typedef int Array[10]; String name; Array ages;

typedef int Array[10]; String name; Array ages; Morteza Noferesti The C language provides a facility called typedef for creating synonyms for previously defined data type names. For example, the declaration: typedef int Length; Length a, b, len ; Length

More information

Warmup January 9th, What is the value of the following C expression? 8*9 % 10/ 2

Warmup January 9th, What is the value of the following C expression? 8*9 % 10/ 2 Warmup January 9th, 2018 What is the value of the following C expression? 8*9 % 10/ 2 Warmup January 11th, 2018 What is the value of the following C expression? ( -42 3!= 3) && ( -3 < -2 < -1) Warmup January

More information

Calendar Excel Template User Guide

Calendar Excel Template User Guide Calendar Excel Template User Guide Excel-based simple Calendar Template Version 3 This Excel-based template provides a calendar template for each month of a year. It also incorporates an hourly schedule

More information

Year 1 and 2 Mastery of Mathematics

Year 1 and 2 Mastery of Mathematics Year 1 and 2 Mastery of Mathematics Mastery of the curriculum requires that all pupils:. use mathematical concepts, facts and procedures appropriately, flexibly and fluently; recall key number facts with

More information

TEMPLATE CALENDAR2015. facemediagroup.co.uk

TEMPLATE CALENDAR2015. facemediagroup.co.uk WALL CALENDAR - A4 SIZE FREE TO DOWNLOAD AND CUSTOMISE. COPYRIGHT OF FACEMEDIAGROUP - PLEASE LEAVE COPYRIGHT AND BRAND MARKS IN PLACE. CALENDAR TEMPLATE FULL PAGE IMAGE THIS CALENDAR TEMPLATE CAN BE FULLY

More information

CHAPTER : 9 FLOW OF CONTROL

CHAPTER : 9 FLOW OF CONTROL CHAPTER 9 FLOW OF CONTROL Statements-Statements are the instructions given to the Computer to perform any kind of action. Null Statement-A null statement is useful in those case where syntax of the language

More information

CALENDAR OF FILING DEADLINES AND SEC HOLIDAYS

CALENDAR OF FILING DEADLINES AND SEC HOLIDAYS CALENDAR OF FILING S AND SEC HOLIDAYS INFORMATION IN THIS CALENDAR HAS BEEN OBTAINED BY SOURCES BELIEVED TO BE RELIABLE, BUT CANNOT BE GUARANTEED FOR ACCURACY. PLEASE CONSULT WITH PROFESSIONAL COUNSEL

More information

Do not turn to the next page until the start of the exam.

Do not turn to the next page until the start of the exam. Introduction to Programming, PIC10A E. Ryu Fall 2017 Midterm Exam Friday, November 3, 2017 50 minutes, 11 questions, 100 points, 8 pages While we don t expect you will need more space than provided, you

More information

1 In simple cases, an array may be created like this: string AAA[1000]; but sometimes a declaration in this form is needed: string * BBB;

1 In simple cases, an array may be created like this: string AAA[1000]; but sometimes a declaration in this form is needed: string * BBB; 1 In simple cases, an array may be created like this: string AAA[1000]; but sometimes a declaration in this form is needed: string * BBB; Short Answers: i. What other step is required before BBB can actually

More information

Other conditional and loop constructs. Fundamentals of Computer Science Keith Vertanen

Other conditional and loop constructs. Fundamentals of Computer Science Keith Vertanen Other conditional and loop constructs Fundamentals of Computer Science Keith Vertanen Overview Current loop constructs: for, while, do-while New loop constructs Get out of loop early: break Skip rest of

More information

2016 Calendar of System Events and Moratoriums

2016 Calendar of System Events and Moratoriums 2016 Calendar of System Events and Moratoriums Table of Contents 1. Terminology and Information 2 2. Quarterly Scheduled System Upgrades and Moratoriums 3 3. Scheduled Infrastructure Window 4 4. Scheme

More information

September 2015 Calendar This Excel calendar is blank & designed for easy use as a planner. Courtesy of WinCalendar.com

September 2015 Calendar This Excel calendar is blank & designed for easy use as a planner. Courtesy of WinCalendar.com September 2015 Calendar This Excel calendar is blank & designed for easy use as a planner. Courtesy of WinCalendar.com August ~ September 2015 ~ Sunday Monday Tuesday Wednesday Thursday Friday 1 2 3 4

More information

Conditional Formatting

Conditional Formatting Microsoft Excel 2013: Part 5 Conditional Formatting, Viewing, Sorting, Filtering Data, Tables and Creating Custom Lists Conditional Formatting This command can give you a visual analysis of your raw data

More information

} Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = / 2; 3. int x = 5 / ; 4. double x = 5 / 2.

} Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = / 2; 3. int x = 5 / ; 4. double x = 5 / 2. Class #10: Understanding Primitives and Assignments Software Design I (CS 120): M. Allen, 19 Sep. 18 Java Arithmetic } Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = 2 + 5 / 2; 3.

More information

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Why C? Test on 21 Android Devices with 32-bits and 64-bits processors and different versions

More information

CPE 112 Spring 2015 Exam II (100 pts) March 4, Definition Matching (8 Points)

CPE 112 Spring 2015 Exam II (100 pts) March 4, Definition Matching (8 Points) Name Definition Matching (8 Points) 1. (8 pts) Match the words with their definitions. Choose the best definition for each word. Relational Expression Iteration Counter Count-controlled loop Loop Flow

More information

name name C S M E S M E S M E Block S Block M C-Various October Sunday

name name C S M E S M E S M E Block S Block M C-Various October Sunday 01.10.2017 October Sunday 1 10 2017 02.10.2017 October Monday 2 10 2017 03.10.2017 October Tuesday 3 10 2017 Tag der Deutschen Einheit 04.10.2017 October Wednesday 4 10 2017 05.10.2017 October Thursday

More information

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester Programming Language Control Structures: Selection (switch) Eng. Anis Nazer First Semester 2018-2019 Multiple selection choose one of two things if/else choose one from many things multiple selection using

More information

B.2 Measures of Central Tendency and Dispersion

B.2 Measures of Central Tendency and Dispersion Appendix B. Measures of Central Tendency and Dispersion B B. Measures of Central Tendency and Dispersion What you should learn Find and interpret the mean, median, and mode of a set of data. Determine

More information

CSC-140 Assignment 6

CSC-140 Assignment 6 CSC-140 Assignment 6 1 Introduction In this assignment we will start out defining our own classes. For now, we will design a class that represents a date, e.g., Tuesday, March 15, 2011, or in short hand

More information

Backup Exec Supplement

Backup Exec Supplement Vision 3 Backup Exec Supplement INPS INPS The Bread Factory, 1A Broughton Street, Battersea, London, SW8 3QJ T: +44 (0) 207 501700 F:+44 (0) 207 5017100 W: www.inps.co.uk Table of Editions and Contents

More information

Read and fill in this page now

Read and fill in this page now Login: Page - 1 CS3 Midterm 1 Read and fill in this page now Fall 2006 Titterton Name: Instructional Login (eg, cs3-ab): UCWISE login: Lab section (day and time): T.A.: Name of the person sitting to your

More information

I2204 ImperativeProgramming Semester: 1 Academic Year: 2018/2019 Credits: 5 Dr Antoun Yaacoub

I2204 ImperativeProgramming Semester: 1 Academic Year: 2018/2019 Credits: 5 Dr Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree I2204 ImperativeProgramming Semester: 1 Academic Year: 2018/2019 Credits: 5 Dr Antoun Yaacoub I2204- Imperative Programming Schedule 08h00-09h40

More information

Lecture 12. Data Types and Strings

Lecture 12. Data Types and Strings Lecture 12 Data Types and Strings Class v. Object A Class represents the generic description of a type. An Object represents a specific instance of the type. Video Game=>Class, WoW=>Instance Members of

More information

What s next? Are you interested in CompTIA A+ classes?

What s next? Are you interested in CompTIA A+ classes? What s next? Are you interested in CompTIA A+ classes? These classes are facilitated by our partner IT Ready. Next CompTIA A+ class will start on July 2019. Class runs from Monday to Friday (9 am to 4

More information

INFORMATION TECHNOLOGY SPREADSHEETS. Part 1

INFORMATION TECHNOLOGY SPREADSHEETS. Part 1 INFORMATION TECHNOLOGY SPREADSHEETS Part 1 Page: 1 Created by John Martin Exercise Built-In Lists 1. Start Excel Spreadsheet 2. In cell B1 enter Mon 3. In cell C1 enter Tue 4. Select cell C1 5. At the

More information

Lecture-14 Lookup Functions

Lecture-14 Lookup Functions Lecture-14 Lookup Functions How do I write a formula to compute tax rates based on income? Given a product ID, how can I look up the product s price? Suppose that a product s price changes over time. I

More information

Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn

Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn Problem Write and test a Scheme program to compute how many days are spanned by two given days. The program will include a procedure

More information

2013 Association Marketing Benchmark Report

2013 Association  Marketing Benchmark Report 2013 Association Email Marketing Benchmark Report Part I: Key Metrics 1 TABLE of CONTENTS About Informz.... 3 Introduction.... 4 Key Findings.... 5 Overall Association Metrics... 6 Results by Country of

More information

(Refer Slide Time: 01.26)

(Refer Slide Time: 01.26) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture # 22 Why Sorting? Today we are going to be looking at sorting.

More information

Calendar PPF Production Cycles Non-Production Activities and Events

Calendar PPF Production Cycles Non-Production Activities and Events 20-207 Calendar PPF Production Cycles Non-Production Activities and Events Four Productions For non-holiday productions 7 Week Stage Cycles 36 Uses plus strike (as in prior years and per agreement with

More information

Math in Focus Vocabulary. Kindergarten

Math in Focus Vocabulary. Kindergarten Math in Focus Vocabulary Kindergarten Chapter Word Definition 1 one 1 * 1 two 2 * * 1 three 3 * * * 1 four 4 * * * * 1 five 5 * * * * * 1 same things that have a common property 1 different things that

More information

YEAR 8 STUDENT ASSESSMENT PLANNER SEMESTER 1, 2018 TERM 1

YEAR 8 STUDENT ASSESSMENT PLANNER SEMESTER 1, 2018 TERM 1 YEAR 8 STUDENT ASSESSMENT PLANNER SEMESTER 1, 2018 TERM 1 Term 1 - Due Dates 22 26 January 29 January 2 February 5 9 February 12 16 February 19 23 February 26 February 2 March 5 9 March 12 16 March 19

More information

MIT AITI Python Software Development

MIT AITI Python Software Development MIT AITI Python Software Development PYTHON L02: In this lab we practice all that we have learned on variables (lack of types), naming conventions, numeric types and coercion, strings, booleans, operator

More information

Computer Grade 5. Unit: 1, 2 & 3 Total Periods 38 Lab 10 Months: April and May

Computer Grade 5. Unit: 1, 2 & 3 Total Periods 38 Lab 10 Months: April and May Computer Grade 5 1 st Term Unit: 1, 2 & 3 Total Periods 38 Lab 10 Months: April and May Summer Vacation: June, July and August 1 st & 2 nd week Day 1 Day 2 Day 3 Day 4 Day 5 Day 6 First term (April) Week

More information

Lecture Programming in C++ PART 1. By Assistant Professor Dr. Ali Kattan

Lecture Programming in C++ PART 1. By Assistant Professor Dr. Ali Kattan Lecture 08-1 Programming in C++ PART 1 By Assistant Professor Dr. Ali Kattan 1 The Conditional Operator The conditional operator is similar to the if..else statement but has a shorter format. This is useful

More information

CHAPTER 5 FLOW OF CONTROL

CHAPTER 5 FLOW OF CONTROL CHAPTER 5 FLOW OF CONTROL PROGRAMMING CONSTRUCTS - In a program, statements may be executed sequentially, selectively or iteratively. - Every programming language provides constructs to support sequence,

More information

Learning Recursion. Recursion [ Why is it important?] ~7 easy marks in Exam Paper. Step 1. Understand Code. Step 2. Understand Execution

Learning Recursion. Recursion [ Why is it important?] ~7 easy marks in Exam Paper. Step 1. Understand Code. Step 2. Understand Execution Recursion [ Why is it important?] ~7 easy marks in Exam Paper Seemingly Different Coding Approach In Fact: Strengthen Top-down Thinking Get Mature in - Setting parameters - Function calls - return + work

More information

2015 PITA New Year s Shoot

2015 PITA New Year s Shoot Presents the 2015 PITA New Year s Shoot January 3 rd & 4 th, 2015 200 Singles 200 Handicap 200 Doubles PGC Magnums PGC Magnums Multiplex REGISTRATION CERTIFICATION: This certifies that Portland Gun Club

More information

QI TALK TIME. Run Charts. Speaker: Dr Michael Carton. Connect Improve Innovate. 19 th Dec Building an Irish Network of Quality Improvers

QI TALK TIME. Run Charts. Speaker: Dr Michael Carton. Connect Improve Innovate. 19 th Dec Building an Irish Network of Quality Improvers QI TALK TIME Building an Irish Network of Quality Improvers Run Charts Speaker: Dr Michael Carton 19 th Dec 2017 Connect Improve Innovate Speaker Speaker: Dr Michael Carton Michael s background is as a

More information

Chapter 6 Reacting to Player Input

Chapter 6 Reacting to Player Input Chapter 6 Reacting to Player Input 6.1 Introduction In this chapter, we will show you how your game program can react to mouse clicks and button presses. In order to do this, we need a instruction called

More information

Highline Excel 2016 Class 09: Date Functions

Highline Excel 2016 Class 09: Date Functions Highline Excel 2016 Class 09: Date Functions Table of Contents Date Functions... 2 Examples of EOMONTH, EDATE and DATE functions:... 2 Fiscal Year... 3 Example of Data Set with Date Helper Columns, including

More information

CS Programming I: Arrays

CS Programming I: Arrays CS 200 - Programming I: Arrays Marc Renault Department of Computer Sciences University of Wisconsin Madison Fall 2017 TopHat Sec 3 (PM) Join Code: 719946 TopHat Sec 4 (AM) Join Code: 891624 Array Basics

More information

Pointers, Arrays and Parameters

Pointers, Arrays and Parameters Pointers, Arrays and Parameters This exercise is different from our usual exercises. You don t have so much a problem to solve by creating a program but rather some things to understand about the programming

More information

CONFERENCE ROOM SCHEDULER

CONFERENCE ROOM SCHEDULER CONFERENCE ROOM SCHEDULER AN OPEN APPLICATION INTERFACE (OAI) USER GUIDE NEC America, Inc. NDA-30006-002 Revision 2.0 January, 1997 Stock # 241732 LIABILITY DISCLAIMER NEC America reserves the right to

More information

Nortel Enterprise Reporting Quality Monitoring Meta-Model Guide

Nortel Enterprise Reporting Quality Monitoring Meta-Model Guide NN44480-110 Nortel Enterprise Reporting Quality Monitoring Meta-Model Guide Product release 6.5 and 7.0 Standard 01.03 November 2009 Nortel Enterprise Reporting Quality Monitoring Meta-Model Guide Publication

More information

How It All Stacks Up - or - Bar Charts with Plotly. ISC1057 Janet Peterson and John Burkardt Computational Thinking Fall Semester 2016

How It All Stacks Up - or - Bar Charts with Plotly. ISC1057 Janet Peterson and John Burkardt Computational Thinking Fall Semester 2016 * How It All Stacks Up - or - Bar Charts with Plotly ISC1057 Janet Peterson and John Burkardt Computational Thinking Fall Semester 2016 In a game of poker, players bet by tossing chips into the center

More information

Boolean Data-Type. Boolean Data Type (false, true) i.e. 3/6/2018. The type bool is also described as being an integer: bool bflag; bflag = true;

Boolean Data-Type. Boolean Data Type (false, true) i.e. 3/6/2018. The type bool is also described as being an integer: bool bflag; bflag = true; Programming in C++ If Statements If the sun is shining Choice Statements if (the sun is shining) go to the beach; True Beach False Class go to class; End If 2 1 Boolean Data Type (false, ) i.e. bool bflag;

More information

Drawing Courses. Drawing Art. Visual Concept Design. Character Development for Graphic Novels

Drawing Courses. Drawing Art. Visual Concept Design. Character Development for Graphic Novels 2018 COURSE DETAILS Drawing Courses Drawing Art Dates 13 March - 18 September 2018 also incl. life drawing sessions on the following Saturdays: 18 & 25 August, 8 & 15 September 18 classes (36 hours) Building

More information

CSE 305 Programming Languages Spring, 2010 Homework 5 Maximum Points: 24 Due 10:30 AM, Friday, February 26, 2010

CSE 305 Programming Languages Spring, 2010 Homework 5 Maximum Points: 24 Due 10:30 AM, Friday, February 26, 2010 CSE 305 Programming Languages Spring, 2010 Homework 5 Maximum Points: 24 Due 10:30 AM, Friday, February 26, 2010 Professor Shapiro February 12, 2010 Write the answers in a file named hw5.txt. Put your

More information

ControlLogix/Studio 5000 Logix Designer Course Code Course Title Duration CCP143 Studio 5000 Logix Designer Level 3: Project Development 4.

ControlLogix/Studio 5000 Logix Designer Course Code Course Title Duration CCP143 Studio 5000 Logix Designer Level 3: Project Development 4. NORTH CONTROLLERS ControlLogix/Studio 5000 Logix Designer CCP143 Studio 5000 Logix Designer Level 3: Project Development 4.0 Tuesday, March 7, 2017 Friday, March 10, 2017 CCP146 Studio 5000 Logix Designer

More information

Fractions and their Equivalent Forms

Fractions and their Equivalent Forms Fractions Fractions and their Equivalent Forms Little kids use the concept of a fraction long before we ever formalize their knowledge in school. Watching little kids share a candy bar or a bottle of soda

More information

ADVANCED ALGORITHMS TABLE OF CONTENTS

ADVANCED ALGORITHMS TABLE OF CONTENTS ADVANCED ALGORITHMS TABLE OF CONTENTS ADVANCED ALGORITHMS TABLE OF CONTENTS...1 SOLVING A LARGE PROBLEM BY SPLITTING IT INTO SEVERAL SMALLER SUB-PROBLEMS CASE STUDY: THE DOOMSDAY ALGORITHM... INTRODUCTION

More information

Schedule/BACnet Schedule

Schedule/BACnet Schedule Object Dictionary 1 Schedule/BACnet Schedule Introduction Note: The Johnson Controls Schedule object is considered a BACnet Schedule object because it supports BACnet functionality. In addition, this object

More information

Name Section: M/W T/TH Number Definition Matching (8 Points)

Name Section: M/W T/TH Number Definition Matching (8 Points) Name Section: M/W T/TH Number Definition Matching (8 Points) 1. (8 pts) Match the words with their definitions. Choose the best definition for each word. Iteration Counter Event Counter Loop Abstract Step

More information

CREATE YOUR CONTENT STRATEGY & LAUNCH PLAN Amanda Genther Inc. & Irresistible Offerings

CREATE YOUR CONTENT STRATEGY & LAUNCH PLAN Amanda Genther Inc. & Irresistible Offerings CREATE YOUR CONTENT STRATEGY & LAUNCH PLAN WHAT WE RE GOING TO TALK ABOUT» How to create content that entices your prospects to buy» How to create a content marketing plan that can be put on autopilot

More information

CS349/SE382 A1 C Programming Tutorial

CS349/SE382 A1 C Programming Tutorial CS349/SE382 A1 C Programming Tutorial Erin Lester January 2005 Outline Comments Variable Declarations Objects Dynamic Memory Boolean Type structs, enums and unions Other Differences The Event Loop Comments

More information

! A set is a collection of objects of the same. ! {6,9,11,-5} and {11,9,6,-5} are equivalent. ! There is no first element, and no successor. of 9.

! A set is a collection of objects of the same. ! {6,9,11,-5} and {11,9,6,-5} are equivalent. ! There is no first element, and no successor. of 9. Sets & Hash Tables Week 13 Weiss: chapter 20 CS 5301 Fall 2015 What are sets?! A set is a collection of objects of the same type that has the following two properties: - there are no duplicates in the

More information

A Beginner s Guide to Programming Logic, Introductory. Chapter 6 Arrays

A Beginner s Guide to Programming Logic, Introductory. Chapter 6 Arrays A Beginner s Guide to Programming Logic, Introductory Chapter 6 Arrays Objectives In this chapter, you will learn about: Arrays and how they occupy computer memory Manipulating an array to replace nested

More information

View a Students Schedule Through Student Services Trigger:

View a Students Schedule Through Student Services Trigger: Department Responsibility/Role File Name Version Document Generation Date 6/10/2007 Date Modified 6/10/2007 Last Changed by Status View a Students Schedule Through Student Services_BUSPROC View a Students

More information

Moody Radio Network 1st Quarter data dates are February, th Quarter Reports are due to SoundExchange by Tuesday, 15-May, 2018

Moody Radio Network 1st Quarter data dates are February, th Quarter Reports are due to SoundExchange by Tuesday, 15-May, 2018 Stations streaming under the agreement signed by the NRB Music Licensing Committee are required to report to SoundExchange two weeks music information per quarter. Moody Radio will be making available

More information

Welcome Back. CSCI 262 Data Structures. Hello, Let s Review. Hello, Let s Review. How to Review 1/9/ Review. Here s a simple C++ program:

Welcome Back. CSCI 262 Data Structures. Hello, Let s Review. Hello, Let s Review. How to Review 1/9/ Review. Here s a simple C++ program: Welcome Back CSCI 262 Data Structures 2 - Review What you learned in CSCI 261 (or equivalent): Variables Types Arrays Expressions Conditionals Branches & Loops Functions Recursion Classes & Objects Streams

More information

CS2304 Spring 2014 Project 3

CS2304 Spring 2014 Project 3 Goal The Bureau of Labor Statistics maintains data sets on many different things, from work place injuries to consumer spending habits, but what you most frequently hear about is employment. Conveniently,

More information

CSCI 135 Software Design and Analysis, C++ Homework 2 Due 2/21/2014

CSCI 135 Software Design and Analysis, C++ Homework 2 Due 2/21/2014 CSCI 135 Software Design and Analysis, C++ Homework 2 Due 2/21/2014 Saad Mneimneh Hunter College of CUNY Problem 1: Walking in Manhattan (well, sort of...) Consider the following triangular grid that grows

More information

Exercises Software Development I. 02 Algorithm Testing & Language Description Manual inspection, test plan, grammar, metasyntax notations (BNF, EBNF)

Exercises Software Development I. 02 Algorithm Testing & Language Description Manual inspection, test plan, grammar, metasyntax notations (BNF, EBNF) Exercises Software Development I 02 Algorithm Testing & Language Description Manual inspection, test plan, grammar, metasyntax notations (BNF, EBNF) October 15th, 2014 Software Development I Winter term

More information

Programming Logic and Design Sixth Edition

Programming Logic and Design Sixth Edition Objectives Programming Logic and Design Sixth Edition Chapter 6 Arrays In this chapter, you will learn about: Arrays and how they occupy computer memory Manipulating an array to replace nested decisions

More information

C++ for Java Programmers

C++ for Java Programmers Basics all Finished! Everything we have covered so far: Lecture 5 Operators Variables Arrays Null Terminated Strings Structs Functions 1 2 45 mins of pure fun Introduction Today: Pointers Pointers Even

More information

Read and fill in this page now. Your instructional login (e.g., cs3-ab): Your lab section days and time: Name of the person sitting to your left:

Read and fill in this page now. Your instructional login (e.g., cs3-ab): Your lab section days and time: Name of the person sitting to your left: CS3 Fall 05 Midterm 1 Read and fill in this page now Your name: Your instructional login (e.g., cs3-ab): Your lab section days and time: Your lab T.A.: Name of the person sitting to your left: Name of

More information

CONDITIONAL EXECUTION: PART 2

CONDITIONAL EXECUTION: PART 2 CONDITIONAL EXECUTION: PART 2 yes x > y? no max = x; max = y; logical AND logical OR logical NOT &&! Fundamentals of Computer Science I Outline Review: The if-else statement The switch statement A look

More information

KENYA 2019 Training Schedule

KENYA 2019 Training Schedule KENYA 2019 Training Schedule Monday Tuesday Wednesday Thursday Friday 4th Feb 5th Feb 6th Feb 7th Feb 8th Feb Using 11th Feb 12th Feb 13th Feb 14th Feb 15th Feb Using (cont...) Field Data Collection and

More information

2/15/12. CS 112 Introduction to Programming. Lecture #16: Modular Development & Decomposition. Stepwise Refinement. Zhong Shao

2/15/12. CS 112 Introduction to Programming. Lecture #16: Modular Development & Decomposition. Stepwise Refinement. Zhong Shao 2/15/12 Stepwise Refinement CS 112 Introduction to Programming main idea: use functions to divide a large programming problem into smaller pieces that are individually easy to understand ------decomposition

More information

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Write a description of the set. 1) {January, February, March, April, May, June, July, August,

More information

Complex data structures. Cedric Saule

Complex data structures. Cedric Saule Complex data structures Cedric Saule cedric.saule@uni-bielefeld.de Arrays in language C In language C, arrays are contiguous spaces in memory. We make the difference between two kinds of arrays : Static

More information

Note: The enumerations range from 0 to (number_of_elements_in_enumeration 1).

Note: The enumerations range from 0 to (number_of_elements_in_enumeration 1). C8-1 Algorithm 1. Use a subtype to represent the numbers for months 2. Use an enumeration to represent the named months 3. Use an enumeration to represent the roman months 4. Get the inputs from the user

More information

Fridays, Saturdays, and Sundays March 2 May 6 (none on Easter, April 1) Saturday times are 9 12:50 p.m., 1 4:50 p.m., 5 9 p.m.

Fridays, Saturdays, and Sundays March 2 May 6 (none on Easter, April 1) Saturday times are 9 12:50 p.m., 1 4:50 p.m., 5 9 p.m. Dick s Sporting Goods, Tom Thumb/Albertsons, and Lowe s Sign-ups Dick s Sporting Goods Dates and Times: Fridays, Saturdays, and Sundays March 2 May 6 (none on Easter, April 1) Friday times are 4 8 p.m.

More information

Common Mistakes with Functions. CSE 1310 Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington

Common Mistakes with Functions. CSE 1310 Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington Common Mistakes with Functions CSE 1310 Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1 Common Mistakes with Functions Printing instead of returning. Returning

More information

Ch 6-2. File Input / Output

Ch 6-2. File Input / Output 2014-1 Ch 6-2. File Input / Output March 30, 2014 Advanced Networking Technology Lab. (YU-ANTL) Dept. of Information & Comm. Eng, Graduate School, Yeungnam University, KOREA (Tel : +82-53-810-2497; Fax

More information

How mobile is changing and what publishers need to do about it

How mobile is changing  and what publishers need to do about it How mobile is changing email and what publishers need to do about it BY ADESTRA The mobile channel has produced a culture of information on-demand. We can now view our emails as and when they come through

More information

Consider the above code. This code compiles and runs, but has an error. Can you tell what the error is?

Consider the above code. This code compiles and runs, but has an error. Can you tell what the error is? Discussion 1H Notes (Week 8, May 20) TA: Brian Choi (schoi@cs.ucla.edu) Section Webpage: http://www.cs.ucla.edu/~schoi/cs31 Dynamic Allocation of Memory Recall that when you create an array, you must know

More information

Unit 5 Test 2 MCC5.G.1 StudyGuide/Homework Sheet

Unit 5 Test 2 MCC5.G.1 StudyGuide/Homework Sheet Unit 5 Test 2 MCC5.G.1 StudyGuide/Homework Sheet Tuesday, February 19, 2013 (Crosswalk Coach Page 221) GETTING THE IDEA! An ordered pair is a pair of numbers used to locate a point on a coordinate plane.

More information

Cambridge English Dates and Fees for 2018

Cambridge English Dates and Fees for 2018 Cambridge English Dates and Fees for 2018 Cambridge English: Key (KET) KET 10,900.00 10,500.00 10,300.00 Saturday, 17 March Thursday, 01 February 9 March 18 March Saturday, 12 May Friday, 6 April 4 May

More information

BHARATI VIDYAPEETH`S INSTITUTE OF MANAGEMENT STUDIES AND RESEARCH NAVI MUMBAI ACADEMIC CALENDER JUNE MAY 2017

BHARATI VIDYAPEETH`S INSTITUTE OF MANAGEMENT STUDIES AND RESEARCH NAVI MUMBAI ACADEMIC CALENDER JUNE MAY 2017 BHARATI VIDYAPEETH`S INSTITUTE OF MANAGEMENT STUDIES AND RESEARCH June 2016 Planner MMS and III rd and IV th Sem MMS 1 st and II nd Sem HOLIDAYS EVENTS June 2016 Planner Jun 16 Monday Tuesday Wednesday

More information

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 4 C Pointers 2004-09-08 Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia Cal flies over Air Force We re ranked 13 th in the US and

More information

SOUTH DAKOTA BOARD OF REGENTS. Board Work ******************************************************************************

SOUTH DAKOTA BOARD OF REGENTS. Board Work ****************************************************************************** SOUTH DAKOTA BOARD OF REGENTS Board Work AGENDA ITEM: 3 C DATE: March 30 April 1, 2016 ****************************************************************************** SUBJECT: Rolling Calendar During the

More information

If Statements, For Loops, Functions

If Statements, For Loops, Functions Fundamentals of Programming If Statements, For Loops, Functions Table of Contents Hello World Types of Variables Integers and Floats String Boolean Relational Operators Lists Conditionals If and Else Statements

More information

Recap. ANSI C Reserved Words C++ Multimedia Programming Lecture 2. Erwin M. Bakker Joachim Rijsdam

Recap. ANSI C Reserved Words C++ Multimedia Programming Lecture 2. Erwin M. Bakker Joachim Rijsdam Multimedia Programming 2004 Lecture 2 Erwin M. Bakker Joachim Rijsdam Recap Learning C++ by example No groups: everybody should experience developing and programming in C++! Assignments will determine

More information

CISC-124. Dog.java looks like this. I have added some explanatory comments in the code, and more explanation after the code listing.

CISC-124. Dog.java looks like this. I have added some explanatory comments in the code, and more explanation after the code listing. CISC-124 20180115 20180116 20180118 We continued our introductory exploration of Java and object-oriented programming by looking at a program that uses two classes. We created a Java file Dog.java and

More information

Exercise 6 - Addressing a Message

Exercise 6 - Addressing a Message Exercise 6 - Addressing a Message All e-mail messages have to include an address for an e-mail to be delivered, just as a normal letter has to have a house address. An e-mail address is made up of: a user

More information

Grid Code Planner EU Code Modifications GC0100/101/102/104

Grid Code Planner EU Code Modifications GC0100/101/102/104 Grid Code Planner EU Code Modifications GC0100/101/102/104 Place your chosen image here. The four corners must just cover the arrow tips. For covers, the three pictures should be the same size and in a

More information

%Addval: A SAS Macro Which Completes the Cartesian Product of Dataset Observations for All Values of a Selected Set of Variables

%Addval: A SAS Macro Which Completes the Cartesian Product of Dataset Observations for All Values of a Selected Set of Variables %Addval: A SAS Macro Which Completes the Cartesian Product of Dataset Observations for All Values of a Selected Set of Variables Rich Schiefelbein, PRA International, Lenexa, KS ABSTRACT It is often useful

More information

IEEE Future Meetings

IEEE Future Meetings IEEE 802.3 Future Meetings Steve Carlson, Executive Secretary High Speed Design scarlson@ieee.org 1 Meetings Demystified 802.3 is growing We re now the largest 802 WG 802 has two types of meetings Plenary

More information

Create quick link URLs for a candidate merge Turn off external ID links in candidate profiles... 4

Create quick link URLs for a candidate merge Turn off external ID links in candidate profiles... 4 Credential Manager 1603 March 2016 In this issue Pearson Credential Management is proud to announce Generate quick link URLs for a candidate merge in the upcoming release of Credential Manager 1603, scheduled

More information