Acceptance Testing. How CSlim and FitNesse Can Help You Test Your Embedded System. Doug Bradbury Software Craftsman, 8th Light

Size: px
Start display at page:

Download "Acceptance Testing. How CSlim and FitNesse Can Help You Test Your Embedded System. Doug Bradbury Software Craftsman, 8th Light"

Transcription

1 Acceptance Testing How CSlim and FitNesse Can Help You Test Your Embedded System Doug Bradbury Software Craftsman, 8th Light 1

2 Tutorial Environment git clone git://github.com/dougbradbury/c_learning.git cd c_learning./bootstrap.sh or with a live CD: cp -R cslim_agile_package c_clearning cd c_learning git pull./bootstrap.sh 2

3 Overview Talk w/ exercises: Acceptance Tests Tutorial: Writing Acceptance tests Tutorial: Fitnesse Tutorial: CSlim Talk: Embedded Systems Integration Bonus Topics 3

4 Introductions Who are you? Where do you work? What experience do you have with... embedded systems? acceptance testing? FitNesse and Slim? 4

5 Objectives As a result of this course you will be able to: Understand the purposes of acceptance testing; Use acceptance tests to define and negotiate scope on embedded systems projects; Integrate a CSlim Server into your embedded systems; 5

6 Objectives (cont) As a result of this course you will be able to: Add CSlim fixtures to your embedded system; Write Fitnesse tests to drive the execution of CSlim fixtures; Write and maintain suites of tests in a responsible manner. 6

7 Points on a star How many points does this star have? 7

8 Star Point Specification Points on a star are counted by the number of exterior points. 8

9 Points on a star How many points does this star have? 9

10 By Example

11 Points on a star Now, how many points does this star have? 11

12 Robo-draw Pick a partner... 12

13 Acceptance Testing Collaboratively producing examples of what a piece of software is supposed to do 13

14 Unit Tests help you build the code right. Acceptance Tests help you build the right code. 14

15 Acceptance Tests A collaborative derivation of scope 15

16 Acceptance Test Living Documentation 16

17 Acceptance Test A medium for communication 17

18 Acceptance Tests Tests 18

19 Acceptance Tests Entire System 19

20 Fail Don t test the entire system 20

21 Acceptance Tests User Interface 21

22 Acceptance Tests Load / Performance 22

23 Acceptance Tests Hardware 23

24 Acceptance Tests Algorithm 24

25 Acceptance Tests QA Tool 25

26 Acceptance Tests Collaboratively produced examples A definition of scope Living documentation A medium for communication 26

27 Why you really need ATs Твой софт - говно! 27

28 Workflow Tests Given, When, Then Preconditions, Action, Results 28

29 Workflow example Given a new car traveling at 30 mph When I fully apply the breaks Then the car should stop within 35 yards 29

30 An example, by example A treadmill controller walkncode.com 30

31 Treadmill Requirements It controls the speed of the treadmill. It increments and decrements the speed. The max speed is configurable. It keeps track of total distance walked. It keeps track of calories burned. 31

32 Ambiguities mph, kph, fps? inc dec amounts? range for max speed? distance in miles, km? formula for tracking calories? 32

33 Treadmill by example Given treadmill speed is 1.0 mph When I increment the speed Then the speed should be 1.1 mph 33

34 Your Turn Write an example for the decrement speed scenario. Write an example for the max speed scenario 34

35 Decrement Speed Given treadmill speed is 1.0 mph When I decrement the speed Then the speed should be 0.9 mph 35

36 Maximum Speed Given treadmill speed is 3.0 mph Given max speed is 3.0 mph When I increment the speed Then the speed should be 3.0 mph 36

37 Calculation Tests A series of inputs and outputs Usually captured in table form 37

38 Division Test numerator denominator quotient?

39 Calories Burned Test speed time calories?

40 Your Turn Write a calculation example for distance traveled. 40

41 Distance Travelled speed time distance?

42 Cumulative Distance speed time distance?

43 When Do you stop? 43

44 Break git clone git://github.com/dougbradbury/c_learning.git cd c_learning./bootstrap.sh or with a live CD: cp -R cslim_agile_package c_clearning cd c_learning git pull./bootstrap.sh 44

45 FitNesse Ecosystem 45

46 Starting FitNesse java -jar fitnesse.jar -p e 0 Options Port: -p 8080 No History: -e 0 46

47 FitNesse Tutorial Follow along! 47

48 It s a wiki 48

49 Editing a page Try typing a WikiWord (at least 2 capital letters) - Then save 49

50 Creating a new page Click on the? to create that new page 50

51 Editing a new page 51

52 Tables Tables in FitNesse are defined with pipes 52

53 Tables Save your table 53

54 User Guide Learn more about the wiki markup language 54

55 Let s write some examples 55

56 Another way to add pages 56

57 Three types of pages Normal - Contain only text and links Test - Executable pages Suite - a SubWiki of tests (or other suites) 57

58 Let s view the new test 58

59 Test Pages Behold, the test button 59

60 Calculation Test Edit this test and create a decision table 60

61 Push the button! Green means passed 61

62 Try some other values Red means failure 62

63 Line up your columns Try the format button 63

64 Workflow Test Create a new test with a script table 64

65 Workflow Test Run 65

66 Workflow failure 66

67 Exercise Create a TreadmillSuite Create the following tests TestIncrementTreadmill (workflow) TestDecrementTreadmill (workflow) TestMaxSpeed (workflow) TestCumulativeDistance (calculation) TestTotalDistance (calculation) 67

68 68

69 69

70 70

71 71

72 72

73 It s Fixture Time cslim/fixtures/fixtures.c 73

74 It s Fixture Time cslim/fixtures/decisiontableexample.c 74

75 Fixture Objects cslim/fixtures/decisiontableexample.c 75

76 Fixture functions cslim/fixtures/decisiontableexample.c 76

77 SlimList cslim/include/cslim/slimlist.h 77

78 Returning a Value cslim/fixtures/decisiontableexample.c All return values are strings. 78

79 Extra functions Decision tables have a few optional functions. 79

80 Order of Execution all setters execute() all getters reset() 80

81 Let s build a fixture CheatSuite.TreadmillControlSuite 81

82 TestIncrementSpeed Exceptions are yellow 82

83 TestIncrementSpeed Let s create a fixture called Treadmill 83

84 Create a Fixture cd treadmill/fixtures/ cp FixtureTemplate.c Treadmill.c sed -i '' s/examplefixture/treadmill/g Treadmill.c 84

85 Register the Fixture fixtures/fixturemain.c 85

86 ReBuild the at target %> make at 86

87 Run the Test again Fixture was found! 87

88 The First Method giventreadmillspeed 88

89 The First Method treadmill/fixtures/treadmill.c 89

90 IncrementSpeed Implement Increment Speed on your own. 90

91 targetspeed Return a value to make the test fail. 91

92 targetspeed Failure 92

93 Treadmill Api include/treadmill/api.h 93

94 Declare an instance treadmill/fixtures/treadmill.c 94

95 Create & Destroy treadmill/fixtures/treadmill.c 95

96 Reading from a SlimList treadmill/fixtures/treadmill.c 96

97 No Parameters treadmill/fixtures/treadmill.c 97

98 Result treadmill/fixtures/treadmill.c 98

99 ReBuild the at target %> make at 99

100 Woot! Green is good 100

101 Exercise Add fixture methods to Treadmill.c to support: TestDecrementSpeed TestMaxSpeed 101

102 Catch up If you need to catch up with the group cp cheat_fixtures/treadmill.c fixtures 102

103 Calculation Test 103

104 Create a new fixture cd treadmill/fixtures/ cp FixtureTemplate.c TreadmillCumulativeDistance.c sed -i '' s/examplefixture/ TreadmillCumulativeDistance/g TreadmillCumulativeDistance.c 104

105 Decision table naming speed => setspeed time => settime distance? => distance 105

106 Make it red. Implement stubs for: settime setspeed distance 106

107 Does anybody really know what time it is? We will use a link-time seam to mock out uptime. include/hardware/uptime.h 107

108 FakeUptime mocks/hardware/fakeuptime.h mocks/hardware/fakeuptime.c 108

109 Back to our fixture Use the uptimemillis extern to set the current time fixtures/treadmillcumulativedistance.c 109

110 Exercise Finish the TreadmillCumulativeDistance fixture. Extra credit: TreadmillDistance fixture. (hint: you ll need to use the reset function) 110

111 Cumulative Distance fixtures/treadmillcumulativedistance.c 111

112 Cumulative Distance fixtures/treadmillcumulativedistance.c 112

113 Cumulative Distance fixtures/treadmillcumulativedistance.c 113

114 Cumulative Distance fixtures/treadmillcumulativedistance.c 114

115 Total Distance fixtures/treadmilldistance.c 115

116 Break Take

117 System Architecture Web App Message Protocol Front Panel Fixtures Domain API Application Production Build AT build Hardware Abstraction Hardware Mock HW 117

118 Hardware Abstraction Remember, acceptance tests are not about testing the hardware. 118

119 Hardware Abstraction include/hardware/pwm.h 4 void Pwm_Create(void); 5 void Pwm_Destroy(void); 6 7 void Pwm_Start(); 8 void Pwm_Stop(); 9 void Pwm_SetDutyCycle(double percent); 10 void Pwm_SetPeriod(int microseconds); 119

120 Hardware Abstraction mocks/hardware/fakepwm.h 4 #include "Pwm.h" 5 6 extern int FakePwm_isRunning; 7 extern int FakePwm_period; 8 extern double FakePwm_dutyCycle; 120

121 Hardware Abstraction mocks/hardware/fakepwm.c 3 int FakePwm_isRunning = 0; 4 double FakePwm_dutyCycle = 0.0; 5 int FakePwm_period = 0; 6 11 void Pwm_Start(void) { FakePwm_isRunning = 1; } 13 void Pwm_Stop(void) { FakePwm_isRunning = 0; } 15 void Pwm_SetDutyCycle(double percent) { FakePwm_dutyCycle = percent; } 17 void Pwm_SetPeriod(int us) { FakePwm_period = us; } 121

122 UI abstraction The UI uses the same API as the tests Click / Press 122

123 UI Abstraction Detect button press... Api_IncrementTargetSpeed();

124 UI Abstraction What about Displays? LCD Application 124

125 UI Abstraction Turn the dependency around with an observer LCD Application 125

126 UI Abstraction Observer Pattern void onspeedchange(double speed) { /*update speed display */ } Api_registerSpeedObserver(&onSpeedChange); 126

127 Messaging Uses the same API as everyone else. Test message parsing independently. 127

128 Timers Can t wait on real time Timer also hit the same API 128

129 Interrupts Generate events in system that can be simulated 129

130 Then what s the point? Acceptance tests are not entire system tests. They are a software collaboration medium. 130

131 Running on target 131

132 Serial Bridge What about running on a target without an ethernet stack? 132

133 Running on target host processor embedded target TCP Serial Fitnesse Slim Bridge Slim Server 133

134 On Target Demo 134

135 Porting CSlim 135

136 Porting CSlim Implement a TCP socket Server only needs to handle one connection at a time calls Slim_HandleConnection with pointers to send / recv functions 136

137 You can help Still some features missing (sut, libraries) Contribute your port back to the project Help reduce memory usage Slim(mer)? 137

138 Bonus topics Multi-parameter script table functions Returning Lists Query tables 138

139 Multiple Parameters Function name alternates with parameters 139

140 Multiple Parameters Function name alternates with parameters 140

141 Multiple Parameters Function name alternates with parameters 141

142 Returning Lists cslim/fixtures/querytableexample

143 Query Tables Rows of Records Order doesn t matter 143

144 Query Tables Return a List of records A record is a list or key, value pairs A key, value pair is a two element list ( ) ((id, 1), (pay, 1000)) ((id 2), (pay, 1500)) 144

145 Query Tables The list must be serialized and returned from the query function. cslim/fixtures/querytableexample.c 145

146 Recommended Reading Specification by Example - Gojko Adzic Test Driven Development for Embedded C - James Grenning Fit - For Developing Software - Mugridge / Cunningham FitNesse Users Guide 146

Introduction to Automated Acceptance Testing

Introduction to Automated Acceptance Testing Introduction to Automated Acceptance Testing Micah Martin, 8th Light, Inc. micah@8thlight.com What are Acceptance Tests? What are Acceptance Tests? ATs vs UTs Acceptance Tests Unit Tests Written by Customer

More information

Project Compiler. CS031 TA Help Session November 28, 2011

Project Compiler. CS031 TA Help Session November 28, 2011 Project Compiler CS031 TA Help Session November 28, 2011 Motivation Generally, it s easier to program in higher-level languages than in assembly. Our goal is to automate the conversion from a higher-level

More information

Automated Keyword Driven Framework using Selenesse. Ameya Naik Rasika Doshi

Automated Keyword Driven Framework using Selenesse. Ameya Naik Rasika Doshi Automated Keyword Driven Framework using Selenesse Ameya Naik Rasika Doshi 1 Contents Challenges in Test Automation Automation Frameworks The SeleNesse Framework Selenium FitNesse Selenesse Library Demo

More information

Tutorial Methodologies for Test-Driven Development of OSGi enabled Embedded Devices

Tutorial Methodologies for Test-Driven Development of OSGi enabled Embedded Devices Tutorial Methodologies for Test-Driven Development of OSGi enabled Embedded Devices 2008 by Christine Mitterbauer, Marcus Harringer MicroDoc GmbH www.microdoc.com Or... 2 Methodologies for Test-Driven

More information

Tutorial 4 Data Persistence in Java

Tutorial 4 Data Persistence in Java TCSS 360: Software Development Institute of Technology and Quality Assurance Techniques University of Washington Tacoma Winter 2017 http://faculty.washington.edu/wlloyd/courses/tcss360 Tutorial 4 Data

More information

Unit 5 Day 4: Law of Sines & Area of Triangles with Sines

Unit 5 Day 4: Law of Sines & Area of Triangles with Sines Unit 5 Day 4: Law of Sines & Area of Triangles with Sines Warm-up: Draw a picture and solve. Label the picture with numbers and words including the angle of elevation/depression and height/length. 1. A

More information

02291: System Integration

02291: System Integration 02291: System Integration Week 3 Hubert Baumeister huba@dtu.dk DTU Compute Technical University of Denmark Spring 2018 Contents User Stories Activity Diagrams Acceptance Tests User stories Basic requirements

More information

Lab Exercise Test First using JUnit

Lab Exercise Test First using JUnit Lunds tekniska högskola Datavetenskap, Nov, 2017 Görel Hedin/Ulf Asklund EDAF45 Programvaruutveckling i grupp projekt Lab Exercise Test First using JUnit Goal This lab is intended to demonstrate basic

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming Java Syntax Program Structure Variables and basic data types. Industry standard naming conventions. Java syntax and coding conventions If Then Else Case statements Looping (for,

More information

Assignment 4: Dodo gets smarter

Assignment 4: Dodo gets smarter Assignment 4: Dodo gets smarter Algorithmic Thinking and Structured Programming (in Greenfoot) 2017 Renske Smetsers-Weeda & Sjaak Smetsers 1 Contents Introduction 1 Learning objectives 1 Instructions 1

More information

Recitation 3 Class and Objects

Recitation 3 Class and Objects 1.00/1.001 Introduction to Computers and Engineering Problem Solving Recitation 3 Class and Objects Spring 2012 1 Scope One method cannot see variables in another; Variables created inside a block: { exist

More information

Beginning with the End in Mind: Driving Development with Acceptance Tests

Beginning with the End in Mind: Driving Development with Acceptance Tests Beginning with the End in Mind: Driving Development with Acceptance Tests Elisabeth Hendrickson Quality Tree Software, Inc. www.qualitytree.com esh@qualitytree.com Last updated November 10, 2009 This work

More information

CSC207 Week 4. Larry Zhang

CSC207 Week 4. Larry Zhang CSC207 Week 4 Larry Zhang 1 Logistics A1 Part 1, read Arnold s emails. Follow the submission schedule. Read the Q&A session in the handout. Ask questions on the discussion board. Submit on time! Don t

More information

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Table of Contents Preparation... 3 Exercise 1: Create a repository. Use the command line.... 4 Create a repository...

More information

3 Continuous Integration 3. Automated system finding bugs is better than people

3 Continuous Integration 3. Automated system finding bugs is better than people This presentation is based upon a 3 day course I took from Jared Richardson. The examples and most of the tools presented are Java-centric, but there are equivalent tools for other languages or you can

More information

CMSC351 - Fall 2014, Homework #2

CMSC351 - Fall 2014, Homework #2 CMSC351 - Fall 2014, Homework #2 Due: October 8th at the start of class Name: Section: Grades depend on neatness and clarity. Write your answers with enough detail about your approach and concepts used,

More information

CMPSCI 187: Programming With Data Structures. Lecture 6: The StringLog ADT David Mix Barrington 17 September 2012

CMPSCI 187: Programming With Data Structures. Lecture 6: The StringLog ADT David Mix Barrington 17 September 2012 CMPSCI 187: Programming With Data Structures Lecture 6: The StringLog ADT David Mix Barrington 17 September 2012 The StringLog ADT Data Abstraction Three Views of Data Java Interfaces Defining the StringLog

More information

Jtest Tutorial. Tutorial

Jtest Tutorial. Tutorial Jtest Jtest Welcome to the Jtest. This tutorial walks you through how to perform common Jtest tasks using example files. Please note that although the four types of tests (static analysis, white-box testing,

More information

CS 2113 Software Engineering

CS 2113 Software Engineering CS 2113 Software Engineering Do this now!!! From C to Java git clone https://github.com/cs2113f18/c-to-java.git cd c-to-java./install_java Professor Tim Wood - The George Washington University We finished

More information

SLIM and the future of FitNesse. Gojko Adzic

SLIM and the future of FitNesse. Gojko Adzic SLIM and the future of FitNesse Gojko Adzic http://gojko.net gojko@gojko.com http://twitter.com/gojkoadzic Is FIT dead? FIT/FitNesse were The acceptance testing toolkit Java FIT has not been developed

More information

LAB 5, THE HIDDEN DELIGHTS OF LINKED LISTS

LAB 5, THE HIDDEN DELIGHTS OF LINKED LISTS LAB 5, THE HIDDEN DELIGHTS OF LINKED LISTS Questions are based on the Main and Savitch review questions for chapter 5 in the Exam Preparation section of the webct course page. In case you haven t observed

More information

Java Review. Fundamentals of Computer Science

Java Review. Fundamentals of Computer Science Java Review Fundamentals of Computer Science Link to Head First pdf File https://zimslifeintcs.files.wordpress.com/2011/12/h ead-first-java-2nd-edition.pdf Outline Data Types Arrays Boolean Expressions

More information

CS102: Variables and Expressions

CS102: Variables and Expressions CS102: Variables and Expressions The topic of variables is one of the most important in C or any other high-level programming language. We will start with a simple example: int x; printf("the value of

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

CS 216 Fall 2007 Final Exam Page 1 of 10 Name: ID:

CS 216 Fall 2007 Final Exam Page 1 of 10 Name:  ID: Page 1 of 10 Name: Email ID: You MUST write your name and e-mail ID on EACH page and bubble in your userid at the bottom of EACH page including this page. If you do not do this, you will receive a zero

More information

Project #1 Seam Carving

Project #1 Seam Carving Project #1 Seam Carving Out: Fri, Jan 19 In: 1 Installing, Handing In, Demos, and Location of Documentation 1. To install, type cs016 install seamcarve into a shell in the directory in which you want the

More information

Acceptance Testing with Fitnesse

Acceptance Testing with Fitnesse Acceptance Testing with Fitnesse Alessandro Marchetto Fondazione Bruno Kessler - IRST Testing tools Jemmy/Abbot/JFCUnit/ FIT/Fitnesse (High level) Business Logic GUI Perfomance and Load Testing JMeter/JUnitPerf

More information

About this exam review

About this exam review Final Exam Review About this exam review I ve prepared an outline of the material covered in class May not be totally complete! Exam may ask about things that were covered in class but not in this review

More information

CS 251 Intermediate Programming Java Basics

CS 251 Intermediate Programming Java Basics CS 251 Intermediate Programming Java Basics Brooke Chenoweth University of New Mexico Spring 2018 Prerequisites These are the topics that I assume that you have already seen: Variables Boolean expressions

More information

CS 326: Operating Systems. Networking. Lecture 17

CS 326: Operating Systems. Networking. Lecture 17 CS 326: Operating Systems Networking Lecture 17 Today s Schedule Project 3 Overview, Q&A Networking Basics Messaging 4/23/18 CS 326: Operating Systems 2 Today s Schedule Project 3 Overview, Q&A Networking

More information

Java Programming Fundamentals - Day Instructor: Jason Yoon Website:

Java Programming Fundamentals - Day Instructor: Jason Yoon Website: Java Programming Fundamentals - Day 1 07.09.2016 Instructor: Jason Yoon Website: http://mryoon.weebly.com Quick Advice Before We Get Started Java is not the same as javascript! Don t get them confused

More information

This exam is open book. Each question is worth 3 points.

This exam is open book. Each question is worth 3 points. This exam is open book. Each question is worth 3 points. Page 1 / 15 Page 2 / 15 Page 3 / 12 Page 4 / 18 Page 5 / 15 Page 6 / 9 Page 7 / 12 Page 8 / 6 Total / 100 (maximum is 102) 1. Are you in CS101 or

More information

Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02

Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02 Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02 Hello, in this lecture we will learn about some fundamentals concepts of java.

More information

CSE P 501 Exam 8/5/04

CSE P 501 Exam 8/5/04 Name There are 7 questions worth a total of 65 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. You may refer to the following references: Course

More information

CS Lecture #14

CS Lecture #14 CS 213 -- Lecture #14 We re starting to catch up! Administrative... Late Night Guide to C++ Chapter 9 pg 222-239 MORE ABOUT CLASSES Part I Interfaces in C++ For those with Java experience, you know that

More information

CSE 401 Final Exam. March 14, 2017 Happy π Day! (3/14) This exam is closed book, closed notes, closed electronics, closed neighbors, open mind,...

CSE 401 Final Exam. March 14, 2017 Happy π Day! (3/14) This exam is closed book, closed notes, closed electronics, closed neighbors, open mind,... CSE 401 Final Exam March 14, 2017 Happy π Day! (3/14) Name This exam is closed book, closed notes, closed electronics, closed neighbors, open mind,.... Please wait to turn the page until everyone has their

More information

Binghamton University. CS-140 Fall Problem Solving. Creating a class from scratch

Binghamton University. CS-140 Fall Problem Solving. Creating a class from scratch Problem Solving Creating a class from scratch 1 Recipe for Writing a Class 1. Write the class boilerplate stuff 2. Declare Fields 3. Write Creator(s) 4. Write accessor methods 5. Write mutator methods

More information

2/28/2018. Let s Talk About Testing the Nonogram Code. ECE 220: Computer Systems & Programming. Example Nonogram Code Solution

2/28/2018. Let s Talk About Testing the Nonogram Code. ECE 220: Computer Systems & Programming. Example Nonogram Code Solution University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Testing the Nonogram Code Let s Talk About Testing the Nonogram Code What

More information

Agile Testing Practices Good Food for all Teams

Agile Testing Practices Good Food for all Teams Agile Testing Practices Good Food for all Teams www.netobjectives.com info@netobjectives.com 1 January 30, 2007 Abstract Agile testing practices have evolved in part as a response to short duration cycles.

More information

SPIRIT FIT APP USER S GUIDE VER: 2.1

SPIRIT FIT APP USER S GUIDE VER: 2.1 SPIRIT FIT APP USER S GUIDE 800.258.8511 www.spiritfitness.com VER: 2.1 USER S GUIDE The SPIRITFIT APP is designed to monitor and record your workout data through an integrated Bluetooth 4.0 module that

More information

Lab 4: Imperative & Debugging 12:00 PM, Feb 14, 2018

Lab 4: Imperative & Debugging 12:00 PM, Feb 14, 2018 CS18 Integrated Introduction to Computer Science Fisler, Nelson Lab 4: Imperative & Debugging 12:00 PM, Feb 14, 2018 Contents 1 Imperative Programming 1 1.1 Sky High Grades......................................

More information

Introduction to Extreme Programming. Extreme Programming is... Benefits. References: William Wake, Capital One Steve Metsker, Capital One Kent Beck

Introduction to Extreme Programming. Extreme Programming is... Benefits. References: William Wake, Capital One Steve Metsker, Capital One Kent Beck Introduction to Extreme Programming References: William Wake, Capital One Steve Metsker, Capital One Kent Beck Extreme Programming is... Lightweight software development method used for small to medium-sized

More information

Math 2250 Lab #3: Landing on Target

Math 2250 Lab #3: Landing on Target Math 2250 Lab #3: Landing on Target 1. INTRODUCTION TO THE LAB PROGRAM. Here are some general notes and ideas which will help you with the lab. The purpose of the lab program is to expose you to problems

More information

This page intentionally left blank

This page intentionally left blank This page intentionally left blank arting Out with Java: From Control Structures through Objects International Edition - PDF - PDF - PDF Cover Contents Preface Chapter 1 Introduction to Computers and Java

More information

Math 2250 Lab #3: Landing on Target

Math 2250 Lab #3: Landing on Target Math 2250 Lab #3: Landing on Target 1. INTRODUCTION TO THE LAB PROGRAM. Here are some general notes and ideas which will help you with the lab. The purpose of the lab program is to expose you to problems

More information

Algebra II. Working with Rational Expressions. Slide 1 / 179 Slide 2 / 179. Slide 4 / 179. Slide 3 / 179. Slide 6 / 179.

Algebra II. Working with Rational Expressions. Slide 1 / 179 Slide 2 / 179. Slide 4 / 179. Slide 3 / 179. Slide 6 / 179. Slide 1 / 179 Slide 2 / 179 Algebra II Rational Expressions & Equations 2015-08-15 www.njctl.org Slide 3 / 179 Slide 4 / 179 Table of Contents Working with Rational Expressions Joint and Inverse Variation

More information

Model-View-Controller

Model-View-Controller Model-View-Controller CSE 331 Section 8 11/15/2012 Slides by Kellen Donohue with material from Krysta Yousoufian, Jackson Roberts, Hal Perkins Agenda hw4, hw6 being graded hw7 due tonight Midterms from

More information

CS113: Lecture 5. Topics: Pointers. Pointers and Activation Records

CS113: Lecture 5. Topics: Pointers. Pointers and Activation Records CS113: Lecture 5 Topics: Pointers Pointers and Activation Records 1 From Last Time: A Useless Function #include void get_age( int age ); int age; get_age( age ); printf( "Your age is: %d\n",

More information

CSE 451: Operating Systems. Sec$on 2 Interrupts, system calls, and project 1

CSE 451: Operating Systems. Sec$on 2 Interrupts, system calls, and project 1 CSE 451: Operating Systems Sec$on 2 Interrupts, system calls, and project 1 Interrupts Ü Interrupt Ü Hardware interrupts caused by devices signaling CPU Ü Excep$on Ü Uninten$onal sobware interrupt Ü Ex:

More information

POWERONE TEMPLATES A DOCUMENT DESCRIBING HOW TO CREATE TEMPLATES.

POWERONE TEMPLATES A DOCUMENT DESCRIBING HOW TO CREATE TEMPLATES. I N F I N I T Y S O F T W O R K S POWERONE TEMPLATES A DOCUMENT DESCRIBING HOW TO CREATE TEMPLATES www.infinitysw.com/help/create Templates What is a template? powerone uses templates as its primary medium

More information

the gamedesigninitiative at cornell university Lecture 12 Architecture Design

the gamedesigninitiative at cornell university Lecture 12 Architecture Design Lecture 12 Take Away for Today What should lead programmer do? How do CRC cards aid software design? What goes on each card? How do you lay m out? What properties should y have? How do activity diagrams

More information

Lab Exercise Refactoring using Eclipse

Lab Exercise Refactoring using Eclipse Lunds tekniska högskola Datavetenskap, Nov, 2017 Torbjörn Ekman and Görel Hedin (Modified from cvs to git by Ulf Asklund) EDAF45 Programvaruutveckling i grupp projekt Lab Exercise Refactoring using Eclipse

More information

Frequently Asked Questions

Frequently Asked Questions Frequently Asked Questions This PowerTools FAQ answers many frequently asked questions regarding the functionality of the various parts of the PowerTools suite. The questions are organized in the following

More information

COMP 250 Winter stacks Feb. 2, 2016

COMP 250 Winter stacks Feb. 2, 2016 Stack ADT You are familiar with stacks in your everyday life. You can have a stack of books on a table. You can have a stack of plates on a shelf. In computer science, a stack is an abstract data type

More information

Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras

Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 08 Tutorial 2, Part 2, Facebook API (Refer Slide Time: 00:12)

More information

The design of the PowerTools engine. The basics

The design of the PowerTools engine. The basics The design of the PowerTools engine The PowerTools engine is an open source test engine that is written in Java. This document explains the design of the engine, so that it can be adjusted to suit the

More information

Premium POS Pizza Order Entry Module. Introduction and Tutorial

Premium POS Pizza Order Entry Module. Introduction and Tutorial Premium POS Pizza Order Entry Module Introduction and Tutorial Overview The premium POS Pizza module is a replacement for the standard order-entry module. The standard module will still continue to be

More information

Prelim 1 SOLUTION. CS 2110, September 29, 2016, 7:30 PM Total Question Name Loop invariants. Recursion OO Short answer

Prelim 1 SOLUTION. CS 2110, September 29, 2016, 7:30 PM Total Question Name Loop invariants. Recursion OO Short answer Prelim 1 SOLUTION CS 2110, September 29, 2016, 7:30 PM 0 1 2 3 4 5 Total Question Name Loop invariants Recursion OO Short answer Exception handling Max 1 15 15 25 34 10 100 Score Grader 0. Name (1 point)

More information

Async Programming & Networking. CS 475, Spring 2018 Concurrent & Distributed Systems

Async Programming & Networking. CS 475, Spring 2018 Concurrent & Distributed Systems Async Programming & Networking CS 475, Spring 2018 Concurrent & Distributed Systems Review: Resource Metric Processes images Camera Sends images Image Service 2 Review: Resource Metric Processes images

More information

Ch. 11: References & the Copy-Constructor. - continued -

Ch. 11: References & the Copy-Constructor. - continued - Ch. 11: References & the Copy-Constructor - continued - const references When a reference is made const, it means that the object it refers cannot be changed through that reference - it may be changed

More information

CSE 374 Midterm Exam Sample Solution 2/6/12

CSE 374 Midterm Exam Sample Solution 2/6/12 Question 1. (12 points) Suppose we have the following subdirectory structure inside the current directory: docs docs/friends docs/friends/birthdays.txt docs/friends/messages.txt docs/cse374 docs/cse374/notes.txt

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 11

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 11 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 11 EXCEPTION HANDLING Many higher-level languages provide exception handling Concept: One part of the program knows how to detect a problem,

More information

Fit for Developing Software

Fit for Developing Software Fit for Developing Software Framework for Integrated Tests Rick Mugridge Ward Cunningham 04) PRENTICE HALL Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich

More information

CSE 143 Lecture 10. Recursion

CSE 143 Lecture 10. Recursion CSE 143 Lecture 10 Recursion slides created by Marty Stepp and Alyssa Harding http://www.cs.washington.edu/143/ Recursion Iteration: a programming technique in which you describe actions to be repeated

More information

CS201 - Assignment 3, Part 2 Due: Wednesday March 5, at the beginning of class

CS201 - Assignment 3, Part 2 Due: Wednesday March 5, at the beginning of class CS201 - Assignment 3, Part 2 Due: Wednesday March 5, at the beginning of class For this assignment we will be developing a text-based Tic Tac Toe game 1. The key to this assignment is that we re going

More information

CS 106 Introduction to Computer Science I

CS 106 Introduction to Computer Science I CS 106 Introduction to Computer Science I 06 / 04 / 2015 Instructor: Michael Eckmann Today s Topics Questions / comments? Calling methods (noting parameter(s) and their types, as well as the return type)

More information

CSE 413 Final Exam. June 7, 2011

CSE 413 Final Exam. June 7, 2011 CSE 413 Final Exam June 7, 2011 Name The exam is closed book, except that you may have a single page of hand-written notes for reference plus the page of notes you had for the midterm (although you are

More information

Today's Topics. CISC 458 Winter J.R. Cordy

Today's Topics. CISC 458 Winter J.R. Cordy Today's Topics Last Time Semantics - the meaning of program structures Stack model of expression evaluation, the Expression Stack (ES) Stack model of automatic storage, the Run Stack (RS) Today Managing

More information

What we will do today Explain and look at examples of. Programs that examine data. Data types. Topic 4. variables. expressions. assignment statements

What we will do today Explain and look at examples of. Programs that examine data. Data types. Topic 4. variables. expressions. assignment statements Topic 4 Variables Once a programmer has understood the use of variables, he has understood the essence of programming -Edsger Dijkstra What we will do today Explain and look at examples of primitive data

More information

cis20.1 design and implementation of software applications I fall 2007 lecture # I.2 topics: introduction to java, part 1

cis20.1 design and implementation of software applications I fall 2007 lecture # I.2 topics: introduction to java, part 1 topics: introduction to java, part 1 cis20.1 design and implementation of software applications I fall 2007 lecture # I.2 cis20.1-fall2007-sklar-leci.2 1 Java. Java is an object-oriented language: it is

More information

Software Development I

Software Development I 6.148 Software Development I Two things How to write code for web apps. How to collaborate and keep track of your work. A text editor A text editor A text editor Anything that you re used to using Even

More information

Discussion 2C Notes (Week 3, January 21) TA: Brian Choi Section Webpage:

Discussion 2C Notes (Week 3, January 21) TA: Brian Choi Section Webpage: Discussion 2C Notes (Week 3, January 21) TA: Brian Choi (schoi@cs.ucla.edu) Section Webpage: http://www.cs.ucla.edu/~schoi/cs32 Abstraction In Homework 1, you were asked to build a class called Bag. Let

More information

CSE 333 Final Exam 3/19/14

CSE 333 Final Exam 3/19/14 Name There are 8 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed book, closed notes, closed

More information

Page 1. Logistics. Introduction to Embedded Systems. Last Time. ES Software Design. Labs start Wed CS/ECE 6780/5780. Al Davis

Page 1. Logistics. Introduction to Embedded Systems. Last Time. ES Software Design. Labs start Wed CS/ECE 6780/5780. Al Davis Logistics Introduction to Embedded Systems CS/ECE 6780/5780 Al Davis Today s topics: logistics - minor synopsis of last lecture software desig finite state machine based control Labs start Wed make sure

More information

CSCI 141 Computer Programming I. Filip Jagodzinski

CSCI 141 Computer Programming I. Filip Jagodzinski Filip Jagodzinski Announcement Using online resources for help I want you to learn from others I want you to learn how to use (good) online resources Learning on your own is a good thing Announcement Using

More information

[2:3] Linked Lists, Stacks, Queues

[2:3] Linked Lists, Stacks, Queues [2:3] Linked Lists, Stacks, Queues Helpful Knowledge CS308 Abstract data structures vs concrete data types CS250 Memory management (stack) Pointers CS230 Modular Arithmetic !!!!! There s a lot of slides,

More information

Inverting the Pyramid

Inverting the Pyramid Inverting the Pyramid Naresh Jain naresh@agilefaqs.com @nashjain http://nareshjain.com Time/Money/Opportunity Cost Plan Back in the Stone-age Happiness/Excitement Design Distribute Work in Isolation Integrate

More information

[Page 177 (continued)] a. if ( age >= 65 ); cout << "Age is greater than or equal to 65" << endl; else cout << "Age is less than 65 << endl";

[Page 177 (continued)] a. if ( age >= 65 ); cout << Age is greater than or equal to 65 << endl; else cout << Age is less than 65 << endl; Page 1 of 10 [Page 177 (continued)] Exercises 4.11 Identify and correct the error(s) in each of the following: a. if ( age >= 65 ); cout

More information

CSE 373 Autumn 2010: Midterm #1 (closed book, closed notes, NO calculators allowed)

CSE 373 Autumn 2010: Midterm #1 (closed book, closed notes, NO calculators allowed) Name: Email address: CSE 373 Autumn 2010: Midterm #1 (closed book, closed notes, NO calculators allowed) Instructions: Read the directions for each question carefully before answering. We may give partial

More information

Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia

Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia The goal for this tutorial is to make sure that you understand a few key concepts related to programming, and that you know the basics

More information

Algebra II. Slide 1 / 179. Slide 2 / 179. Slide 3 / 179. Rational Expressions & Equations. Table of Contents

Algebra II. Slide 1 / 179. Slide 2 / 179. Slide 3 / 179. Rational Expressions & Equations. Table of Contents Slide 1 / 179 Slide 2 / 179 Algebra II Rational Expressions & Equations 2015-08-15 www.njctl.org Table of Contents Slide 3 / 179 Working with Rational Expressions Joint and Inverse Variation Simplifying

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 11

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 11 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2015 Lecture 11 EXCEPTION HANDLING! Many higher-level languages provide exception handling! Concept: One part of the program knows how to detect a problem,

More information

Get comfortable using computers

Get comfortable using computers Mouse A computer mouse lets us click buttons, pick options, highlight sections, access files and folders, move around your computer, and more. Think of it as your digital hand for operating a computer.

More information

Table of Contents Date(s) Title/Topic Page #s. Chapter 4: Writing Classes 4.1 Objects Revisited

Table of Contents Date(s) Title/Topic Page #s. Chapter 4: Writing Classes 4.1 Objects Revisited Table of Contents Date(s) Title/Topic Page #s 11/6 Chapter 3 Reflection/Corrections 56 Chapter 4: Writing Classes 4.1 Objects Revisited 57 58-59 look over your Ch 3 Tests and write down comments/ reflections/corrections

More information

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website:

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: https://users.wpi.edu/~sjarvis/ece2049_smj/ We will come around checking your pre-labs

More information

University of Hull Department of Computer Science C4DI Interfacing with Arduinos

University of Hull Department of Computer Science C4DI Interfacing with Arduinos Introduction Welcome to our Arduino hardware sessions. University of Hull Department of Computer Science C4DI Interfacing with Arduinos Vsn. 1.0 Rob Miles 2014 Please follow the instructions carefully.

More information

Soda Machine Laboratory

Soda Machine Laboratory Soda Machine Laboratory Introduction This laboratory is intended to give you experience working with multiple queue structures in a familiar real-world setting. The given application models a soda machine

More information

CS 112 Project Assignment: Visual Password

CS 112 Project Assignment: Visual Password CS 112 Project Assignment: Visual Password Instructor: Dan Fleck Overview In this project you will use Python to implement a visual password system. In the industry today there is ongoing research about

More information

the gamedesigninitiative at cornell university Lecture 13 Architecture Design

the gamedesigninitiative at cornell university Lecture 13 Architecture Design Lecture 13 Take Away for Today What should lead programmer do? How do CRC cards aid software design? What goes on each card? How do you lay m out? What properties should y have? How do activity diagrams

More information

CS2110 Assignment 2 Lists, Induction, Recursion and Parsing, Summer

CS2110 Assignment 2 Lists, Induction, Recursion and Parsing, Summer CS2110 Assignment 2 Lists, Induction, Recursion and Parsing, Summer 2008 Due Thursday July 3, 2008, 6:00PM 0 General Instructions 0.1 Purpose This assignment will help you solidify your knowledge of Java

More information

Lesson Plan -- Multiplying and Dividing Integers

Lesson Plan -- Multiplying and Dividing Integers Lesson Plan -- Multiplying and Dividing Integers Chapter Resources - Lesson 3-9 Multiply Integers - Lesson 3-9 Multiply Integers Answers - Lesson 3-10 Divide Integers - Lesson 3-10 Divide Integers Answers

More information

git and the virtue of version control ECE /2/2015

git and the virtue of version control ECE /2/2015 git and the virtue of version control ECE 18-545 9/2/2015 Version Control What is it? A tool for collaborative editing A tool for keeping an edit history A tool for managing edit versions For the code

More information

Arrays & Classes. Problem Statement and Specifications

Arrays & Classes. Problem Statement and Specifications Arrays & Classes Quick Start Compile step once always make -k baseball8 mkdir labs cd labs Execute step mkdir 8 java Baseball8 cd 8 cp /samples/csc/156/labs/8/*. Submit step emacs Player.java & submit

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

EEN118 LAB THREE. Section A - Conversions A1. Remembering how to start. A2. Exotic Canada

EEN118 LAB THREE. Section A - Conversions A1. Remembering how to start. A2. Exotic Canada EEN118 LAB THREE The purpose of this lab is to ensure that you are confident with - and have had a lot of practice at - writing small clear functions that give precise control over repetitive tasks. The

More information

Project #1 Seamcarve

Project #1 Seamcarve Project #1 Seamcarve Out: Thursday, January 24 In: This is real, this is me Im exactly where I m supposed to be, now Gonna let the light, shine on me Now I ve found, who I am There s no way to hold it

More information

Assignment III: Graphing Calculator

Assignment III: Graphing Calculator Assignment III: Graphing Calculator Objective The goal of this assignment is to reuse your CalculatorBrain and CalculatorViewController objects to build a Graphing Calculator. By doing this, you will gain

More information

SECTION 2: Loop Reasoning & HW3 Setup

SECTION 2: Loop Reasoning & HW3 Setup SECTION 2: Loop Reasoning & HW3 Setup cse331-staff@cs.washington.edu Review: Reasoning about loops What is a loop invariant? An assertion that always holds at the top of a loop Why do we need invariants?

More information

COMP110 Jump Around. Go ahead and get today s code in Eclipse as shown on next few slides. Kris Jordan

COMP110 Jump Around. Go ahead and get today s code in Eclipse as shown on next few slides. Kris Jordan Go ahead and get today s code in Eclipse as shown on next few slides COMP110 Jump Around Fall 2015 Sections 2 & 3 Sitterson 014 November 19th, 2015 Kris Jordan kris@cs.unc.edu Sitterson 238 Classroom Materials

More information

Objective- Students will be able to use the Order of Operations to evaluate algebraic expressions. Evaluating Algebraic Expressions

Objective- Students will be able to use the Order of Operations to evaluate algebraic expressions. Evaluating Algebraic Expressions Objective- Students will be able to use the Order of Operations to evaluate algebraic expressions. Evaluating Algebraic Expressions Variable is a letter or symbol that represents a number. Variable (algebraic)

More information