Project 2: Bejeweled

Size: px
Start display at page:

Download "Project 2: Bejeweled"

Transcription

1 Project 2: Bejeweled Project Objective: Post: Tuesday March 26, Due: 11:59PM, Monday April 15, master the process of completing a programming project in UNIX. 2. get familiar with command line argument and file I/O. 3. practice with array and two dimensional array operations. 4. learn techniques on problem solving and efficient programming Project Description: In this project, you will design and implement the game Bejeweled (read more on its wiki page at You will have a 8x8 board full of different kind of gems. The goal of the game is to swap one gem with an adjacent gem to form a horizontal of vertical chain of three or more gems. Gems disappear when chains are formed and gems fall from the top to fill in gaps. Sometimes chain reactions, called cascades, are triggered, where chains are formed by the falling gems. Points are given when a chain of three or more gems is formed; bonus points are given when more than three identical gems are formed, when two chains are formed at the same time; or when cascades occur. Your goal in this project is to score as many points as you can within a given number of swaps. General Requirements: 1) Your program will run by typing the following command (assuming that the executable of your program is named a.out): a.out board swaps moves points board is the input file that contains all the gems that will appear on the game board during playtime, swaps is a non-negative integer indicating the number of swaps you are allowed to make, moves and points are the file names where you keep your gameplay and score. Your program should check the number of command argument, verify the value of swaps, and make sure the input and output files can be opened. If there is any error, print out an error message and terminate the execution. No need to write anything to the output file. You can run the sample executable (which will be posted in the GLUE public directory) for proper error messages. 2) The output file moves will record all the swaps you have made. The output file points records the details of the gameplay for each move/swap: the swap you have made, the points you have earned, and the game board after the move, as well as the total points. It is very important to produce output files with the required format. Your program will be tested and graded based on these files.

2 Game Rules 1) The game board The size of the game board will be 8x8. There will be 8 different kinds of gems, represented by A B C D E F G H. Following is an example of the game board 8 A B C D E F G H 7 A B C D E F G H 6 D A B A D E F G 5 A B F D F D G H 4 H A B C D E F G 3 B C D E F D H C 2 A B C D E F G H 1 A B C D E F G H where the numbers 1-8 in the first column and on the last row show the coordinates of the positions in the game board. For example, the E is positioned at (6,4). You will need to print out the numbers 1-8. Bold font and underlines are just to make it clear to see, you should not print them out. 2) How to make a swap You enter four (4) integers between 1 and 8 to indicate the two gems you want to swap. For example, if you want to swap the E and the D, you enter You can only swap two gems that are horizontally or vertically adjacent to each other. When you enter invalid coordinates (numbers outside of the range of 1-8) or coordinates for gems that are not next to each other, your program should print out an error message and ask you to re-enter all the four (4) integers. 3) How to update the board on a swap i. Initially the game board from the input file does not contain any row or column with three consecutive identical gems (called chain). ii. If a swap results in one or more chains of three or more identical gems a. the chains will be moved away from the game board; b. you will earn points (see item 4) below for more details); c. gems on top of the empty positions will fall to fill those empty positions d. empty positions on top of the board will be filled by gems from the input file iii. When there are chains in the new game board, repeat the steps a-d above until there is no chains on the board. (And then wait for user s next move). 4) How points are awarded for chains of three or more i. 10 points a chain of 3 ii. 10 bonus points per extra gem in a chain iii. 10 bonus points per each gem shared in two chains iv. 10 bonus points per chain per round when cascade happens

3 Input and Game Board The input file gives the game board information. It has 2000 lines, each line has exactly eight (8) characters. The characters are chosen from A, B, C, D, E, F, G, and H, each letter represents a different type of gem. The first line are the gems on the bottom row of the board, the second line are the gems on the second row from bottom, and so on. On each line, the gems are from left to right. For example, the first 12 lines of the input file that gives the sample game board is (letters in bold font and underlined are examples on how to fill the game board, ignore them for now). Game board Input file 8 A B C D E F G H ABCDEFGH 7 A B C D E F G H ABCDEFGH 6 D A B A D E F G BCDEFDHC 5 A H F H F D G H HABCDEFG 4 H A B C D E F G AHFHFDGH 3 B C D E F D H C DABADEFG 2 A B C D E F G H ABCDEFGH 1 A B C D E F G H ABCDEFGH BDABCDEF DABCDEFG DABCDEFG ABCDEFGH When the chains are removed from the game board, we will fill the empty positions by gems from the input file. For example, when the second and third gems on the third row (C and D) are swapped, there will be a chain of 3 C s in the third column and should be removed (see the left game board below). The gems on top of this column (BFBCC) will fall to fill the empty slots and create three empty positions on the top of this column, which we will fill by getting gems from the third letters on lines 9-11 in the input file, which are ABB. This gives us the middle game board below. On this new game board we have another chain, 3 A s on the sixth row. This is what we called cascade. Similarly, we need to remove this chain; let BBD and BBD on row 7 and row 8 to fall into row 6 and row 7, respectively; then fill the three empty positions on the top row by DCB from the input file (as underlined in the input file above). Notice that D and B are from line 9 of the input file, but C is from line 12 (because the 3 letters ABB in this position on lines 9-11 were already taken). The right game board below is the final game board after this swap. 8 A B C D E F G H 7 A B C D E F G H 6 D A B A D E F G 5 A H F H F D G H 4 H A B C D E F G 3 B D E F D H C 2 A B D E F G H 1 A B D E F G H 8 A B B D E F G H 6 D A A A D E F G 5 A H C H F D G H 4 H A C C D E F G 8 A D C B E F G H 6 D B B D D E F G 5 A H C H F D G H 4 H A C C D E F G

4 Points and End of the Game Basic points: 10 points for a chain of exactly 3 identical gems, either horizontally or vertically. Bonus points: o 10 bonus points for extra gem in a chain. That is, 20 points for a chain of 4; 30 for a chain of 5; 40 points for a chain of 6; 50 points for a chain of 7; and 60 points for a chain of 8. o 10 bonus points for each gem shared in two chains. On the fraction of a game board shown on the right, swapping the underlined A with the C on its left will give a chain of 3 C s in one row and a chain of 4 C s in one column. This will be rewarded by 10 points for the row, 20 points for the column, and A H C H F D G H H C A C C E F G B D C E F D H C A B C D E F G H 10 more points for the fact that the two chains share one C in common. So a total of 40 points. o 10 bonus points for each chain in each round when cascade happens. In the middle game board above, the chain of 3 A s on the sixth row is formed when the first cascade occurs, so it will worth 20 points (10 for a chain of 3 and 10 for cascade bonus). If cascade happens for the second time, each chain formed in that round will have 20 bonus points. Chains formed in the third round of a cascade will get 30 bonus points, and so on. Points evaluation: when there are multiple chains formed by a swap or in the case of cascade, points (including bonus when applicable) will be given for each of the chains. Then you will need to remove all the gems that are involved in any of the chains, fill in the empty positions by new gems from the input file, and check whether another round of cascade occurs. The game ends when (i) the user has entered swaps number of valid swaps (recall that swaps is the maximal number of times the user can swap two gems), or (ii) all the gems from the input file have been filled in the game board and there are less than 3 gems left on the game board (no chance to form any chain of 3 or more). Output 1) Output file moves: this file records all the valid swaps that the user has made. There will be four (4) integers between 1 and 8 on each line, and a total number of swaps lines (recall that swaps is the number of swaps that the user can choose). For example, ) Output file points: this file records the details of the gameplay for each move/swap and the total points when the game is over. For each valid swap, you need to print out the positions of the two gems that will be swapped, the total points that you earn as a result of this swap (including all the basic points and bonus points), the game board when there is no chain of three or more. It has the following format (check the same output files for spacing between the words):

5 swap: (2,3) and (3,3) points: 30 8 A D C B E F G H 6 D B B D D E F G 5 A H C H F D G H 4 H A C C D E F G swap: (8,4) and (8,5) points: 0 8 A D C B E F G H 6 D B B D D E F G 5 A H C H F D G G 4 H A C C D E F H swap: (8,3) and (7,3) points: Total points: Special Note 1) A sample executable file will be posted on the GLUE public directory together with an input file and some output files. a. Your program will be graded by comparing the output files generated by your program and the output files generated by the sample executable. So pay attention to the output format. b. The input file posted in the GLUE public directory will be used for grading. c. Other input files will also be used for grading and they will be posted one day before the project due date. d. Input error-free assumption: you can assume that the input file is error-free. i. the input files will follow exactly the format listed above ii lines, 8 letters on each line, no other characters other than A-H iii. there is no chains of three or more in the initial board (first 8 lines of the input)

6 2) You will need to store all the input information in your program. The following two dimensional array might be the most convenient data structure for this purpose (but not necessarily the only one) char gems[8][2001]; where gems[0], for example, will store the first letters of each line in the input file and they will be used to fill the first column of the game board. Recall that you need a \0 at the end of each string so we declare the size of each gems[i] to be 2001, instead of You may also find it convenient to remove the gems in a chain by deleting them from the two dimensional array gems. Therefore, when gems[0], for example, becomes empty, you know that there are no gems in the first column of the game board. 3) Although it is not required, you may find it helpful to print out the positions of the gems that are in a chain of three or more. This will help you to test your program. 4) You should play with the same executable and your code for testing and debugging purpose. To encourage this, we will give up to 10 points as bonus. For the first input file posted in the GLUE public directory, use swaps =20 and enter moves the way you want in order to score more points. Send us the output file moves when you find a high score. Name this file moves.20. The moves that result in the top 10 high scores with get up to 10 bonus points. 5) A Question and Answer file will be posted under the GLUE public directory and updated frequently. notice will be sent to you only when important update is added. Project Requirements: 1. You must program using C under GLUE UNIX system and name your program p2.c. 2. Your program must be properly documented. 3. One day before the project due time, the input files that will be used to grade your project will be posted. IMPORTANT: Input files are critical for this project, use cp command to copy the input files from GLUE class public directory to your own directory for testing. 4. submit the project (p2.c and moves.20) by the following commend (remember to replace the???? by your own section number): submit 2013 spring enee 140???? 3 p2.c submit 2013 spring enee 140???? 3 moves.20 Grading Criteria: Correctness of the program 90% Good coding style and documentation 10% moves.20 bonus +10% Late submission penalty: within the first 24 hours -40% after the first 24 hours -100% program that does not compile under GLUE UNIX -100% wrong file name (other than p2.c) -100%

7 A programming template/outline just for your reference. It is by no means a complete program or defines all the necessary variables. You do not have to follow it. int main(int argc, char * argv[]) { declare variables that include at least the followings: FILE *IN, *OUT1, *OUT2; char gems[8][2001]; // information from the input file int moves, // number of moves a user can make count = 0, // counts the number of moves made cascade = 0, // number of rounds cascade happens points = 0, // total points for one swap total = 0; // total points for the game check argc == 5 or not; open files with safety check; read data from input file and store them in gems; while (count <= moves && number of gems left >= 3) { print out game board on screen; do{ prompt user for two gems to swap; read in user input; } while (input is invalid); points = 0; cascade = 0; moves ++; do{ update gems[][] based on user input or cascade; evaluate the game board to find all the chains; update points, cascade, gems[][], etc. } while (there is cascade); print out information about this swap to the output files; total += points; } print out total points to the output file; close all files; } return 0;

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9. Working with Tables in Microsoft Word The purpose of this document is to lead you through the steps of creating, editing and deleting tables and parts of tables. This document follows a tutorial format

More information

CISC 181 Project 3 Designing Classes for Bank Accounts

CISC 181 Project 3 Designing Classes for Bank Accounts CISC 181 Project 3 Designing Classes for Bank Accounts Code Due: On or before 12 Midnight, Monday, Dec 8; hardcopy due at beginning of lecture, Tues, Dec 9 What You Need to Know This project is based on

More information

The resulting tile cannot merge with another tile again in the same move. When a 2048 tile is created, the player wins.

The resulting tile cannot merge with another tile again in the same move. When a 2048 tile is created, the player wins. 2048 2048 is number puzzle game created in March 2014 by 19-year-old Italian web developer Gabriele Cirulli, in which the objective is to slide numbered tiles on a grid to combine them and create a tile

More information

State of Michigan Data Exchange Gateway. Web-Interface Users Guide 12-07-2009

State of Michigan Data Exchange Gateway. Web-Interface Users Guide 12-07-2009 State of Michigan Data Exchange Gateway Web-Interface Users Guide 12-07-2009 Page 1 of 21 Revision History: Revision # Date Author Change: 1 8-14-2009 Mattingly Original Release 1.1 8-31-2009 MM Pgs 4,

More information

FTP client Selection and Programming

FTP client Selection and Programming COMP 431 INTERNET SERVICES & PROTOCOLS Spring 2016 Programming Homework 3, February 4 Due: Tuesday, February 16, 8:30 AM File Transfer Protocol (FTP), Client and Server Step 3 In this assignment you will

More information

CmpSci 187: Programming with Data Structures Spring 2015

CmpSci 187: Programming with Data Structures Spring 2015 CmpSci 187: Programming with Data Structures Spring 2015 Lecture #12 John Ridgway March 10, 2015 1 Implementations of Queues 1.1 Linked Queues A Linked Queue Implementing a queue with a linked list is

More information

PA2: Word Cloud (100 Points)

PA2: Word Cloud (100 Points) PA2: Word Cloud (100 Points) Due: 11:59pm, Thursday, April 16th Overview You will create a program to read in a text file and output the most frequent and unique words by using an ArrayList. Setup In all

More information

Computer Literacy Syllabus Class time: Mondays 5:00 7:00 p.m. Class location: 955 W. Main Street, Mt. Vernon, KY 40456

Computer Literacy Syllabus Class time: Mondays 5:00 7:00 p.m. Class location: 955 W. Main Street, Mt. Vernon, KY 40456 Computer Literacy Syllabus Class time: Mondays 5:00 7:00 p.m. Class location: 955 W. Main Street, Mt. Vernon, KY 40456 INSTRUCTOR: Jamie A. McFerron OFFICE: 245 Richmond Street Mt. Vernon, KY 40456 PHONE:

More information

Review of Hashing: Integer Keys

Review of Hashing: Integer Keys CSE 326 Lecture 13: Much ado about Hashing Today s munchies to munch on: Review of Hashing Collision Resolution by: Separate Chaining Open Addressing $ Linear/Quadratic Probing $ Double Hashing Rehashing

More information

Simple File Input & Output

Simple File Input & Output Simple File Input & Output Handout Eight Although we are looking at file I/O (Input/Output) rather late in this course, it is actually one of the most important features of any programming language. The

More information

CS 103 Lab Linux and Virtual Machines

CS 103 Lab Linux and Virtual Machines 1 Introduction In this lab you will login to your Linux VM and write your first C/C++ program, compile it, and then execute it. 2 What you will learn In this lab you will learn the basic commands and navigation

More information

ASCII Encoding. The char Type. Manipulating Characters. Manipulating Characters

ASCII Encoding. The char Type. Manipulating Characters. Manipulating Characters The char Type ASCII Encoding The C char type stores small integers. It is usually 8 bits. char variables guaranteed to be able to hold integers 0.. +127. char variables mostly used to store characters

More information

5 Arrays and Pointers

5 Arrays and Pointers 5 Arrays and Pointers 5.1 One-dimensional arrays Arrays offer a convenient way to store and access blocks of data. Think of arrays as a sequential list that offers indexed access. For example, a list of

More information

Visual Basic Programming. An Introduction

Visual Basic Programming. An Introduction Visual Basic Programming An Introduction Why Visual Basic? Programming for the Windows User Interface is extremely complicated. Other Graphical User Interfaces (GUI) are no better. Visual Basic provides

More information

Member Functions of the istream Class

Member Functions of the istream Class Member Functions of the istream Class The extraction operator is of limited use because it always uses whitespace to delimit its reads of the input stream. It cannot be used to read those whitespace characters,

More information

Unit 11 Fractions and decimals

Unit 11 Fractions and decimals Unit 11 Fractions and decimals Five daily lessons Year 4 Spring term (Key objectives in bold) Unit Objectives Year 4 Use fraction notation. Recognise simple fractions that are Page several parts of a whole;

More information

Basic Excel Handbook

Basic Excel Handbook 2 5 2 7 1 1 0 4 3 9 8 1 Basic Excel Handbook Version 3.6 May 6, 2008 Contents Contents... 1 Part I: Background Information...3 About This Handbook... 4 Excel Terminology... 5 Excel Terminology (cont.)...

More information

Lexical Analysis and Scanning. Honors Compilers Feb 5 th 2001 Robert Dewar

Lexical Analysis and Scanning. Honors Compilers Feb 5 th 2001 Robert Dewar Lexical Analysis and Scanning Honors Compilers Feb 5 th 2001 Robert Dewar The Input Read string input Might be sequence of characters (Unix) Might be sequence of lines (VMS) Character set ASCII ISO Latin-1

More information

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012 Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

More information

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0 VISUAL GUIDE to RX Scripting for Roulette Xtreme - System Designer 2.0 UX Software - 2009 TABLE OF CONTENTS INTRODUCTION... ii What is this book about?... iii How to use this book... iii Time to start...

More information

Ready, Set, Go! Math Games for Serious Minds

Ready, Set, Go! Math Games for Serious Minds Math Games with Cards and Dice presented at NAGC November, 2013 Ready, Set, Go! Math Games for Serious Minds Rande McCreight Lincoln Public Schools Lincoln, Nebraska Math Games with Cards Close to 20 -

More information

The Crescent Primary School Calculation Policy

The Crescent Primary School Calculation Policy The Crescent Primary School Calculation Policy Examples of calculation methods for each year group and the progression between each method. January 2015 Our Calculation Policy This calculation policy has

More information

Hypercosm. Studio. www.hypercosm.com

Hypercosm. Studio. www.hypercosm.com Hypercosm Studio www.hypercosm.com Hypercosm Studio Guide 3 Revision: November 2005 Copyright 2005 Hypercosm LLC All rights reserved. Hypercosm, OMAR, Hypercosm 3D Player, and Hypercosm Studio are trademarks

More information

Lab 1: Introduction to C, ASCII ART and the Linux Command Line Environment

Lab 1: Introduction to C, ASCII ART and the Linux Command Line Environment .i.-' `-. i..' `/ \' _`.,-../ o o \.' ` ( / \ ) \\\ (_.'.'"`.`._) /// \\`._(..: :..)_.'// \`. \.:-:. /.'/ `-i-->..

More information

Introduction to Programming System Design. CSCI 455x (4 Units)

Introduction to Programming System Design. CSCI 455x (4 Units) Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,

More information

An Incomplete C++ Primer. University of Wyoming MA 5310

An Incomplete C++ Primer. University of Wyoming MA 5310 An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages

More information

Pizza. Pizza with Everything Identifying & Estimating Fractions up to 1. Serves 2-4 players / Grades 3+ (Includes a variation for Grades 1+)

Pizza. Pizza with Everything Identifying & Estimating Fractions up to 1. Serves 2-4 players / Grades 3+ (Includes a variation for Grades 1+) LER 5060 Pizza TM 7 Games 2-4 Players Ages 6+ Contents: 13 pizzas - 64 fraction slices 3 double-sided spinners 1 cardboard spinner center 2 piece plastic spinner arrow Assemble the spinner arrow as shown

More information

CS170 Lab 11 Abstract Data Types & Objects

CS170 Lab 11 Abstract Data Types & Objects CS170 Lab 11 Abstract Data Types & Objects Introduction: Abstract Data Type (ADT) An abstract data type is commonly known as a class of objects An abstract data type in a program is used to represent (the

More information

A Brief Introduction to MySQL

A Brief Introduction to MySQL A Brief Introduction to MySQL by Derek Schuurman Introduction to Databases A database is a structured collection of logically related data. One common type of database is the relational database, a term

More information

csce4313 Programming Languages Scanner (pass/fail)

csce4313 Programming Languages Scanner (pass/fail) csce4313 Programming Languages Scanner (pass/fail) John C. Lusth Revision Date: January 18, 2005 This is your first pass/fail assignment. You may develop your code using any procedural language, but you

More information

1 Description of The Simpletron

1 Description of The Simpletron Simulating The Simpletron Computer 50 points 1 Description of The Simpletron In this assignment you will write a program to simulate a fictional computer that we will call the Simpletron. As its name implies

More information

HOW TO CREATE AN HTML5 JEOPARDY- STYLE GAME IN CAPTIVATE

HOW TO CREATE AN HTML5 JEOPARDY- STYLE GAME IN CAPTIVATE HOW TO CREATE AN HTML5 JEOPARDY- STYLE GAME IN CAPTIVATE This document describes the steps required to create an HTML5 Jeopardy- style game using an Adobe Captivate 7 template. The document is split into

More information

Arrays. number: Motivation. Prof. Stewart Weiss. Software Design Lecture Notes Arrays

Arrays. number: Motivation. Prof. Stewart Weiss. Software Design Lecture Notes Arrays Motivation Suppose that we want a program that can read in a list of numbers and sort that list, or nd the largest value in that list. To be concrete about it, suppose we have 15 numbers to read in from

More information

How to Configure and Use the Moodle 1.9.5 Grade Book

How to Configure and Use the Moodle 1.9.5 Grade Book How to Configure and Use the Moodle 1.9.5 Grade Book Table of Contents I. Definitions... 2 II. Grade Book Suggestions... 2 III. Decide on Aggregation Methods... 3 IV. Add Categories... 4 V. Add Graded

More information

Iteration CHAPTER 6. Topic Summary

Iteration CHAPTER 6. Topic Summary CHAPTER 6 Iteration TOPIC OUTLINE 6.1 while Loops 6.2 for Loops 6.3 Nested Loops 6.4 Off-by-1 Errors 6.5 Random Numbers and Simulations 6.6 Loop Invariants (AB only) Topic Summary 6.1 while Loops Many

More information

arrays C Programming Language - Arrays

arrays C Programming Language - Arrays arrays So far, we have been using only scalar variables scalar meaning a variable with a single value But many things require a set of related values coordinates or vectors require 3 (or 2, or 4, or more)

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Scanner-Parser Project Thursday, Feb 7 DUE: Wednesday, Feb 20, 9:00 pm This project

More information

State of Illinois Web Content Management (WCM) Guide For SharePoint 2010 Content Editors. 11/6/2014 State of Illinois Bill Seagle

State of Illinois Web Content Management (WCM) Guide For SharePoint 2010 Content Editors. 11/6/2014 State of Illinois Bill Seagle State of Illinois Web Content Management (WCM) Guide For SharePoint 2010 Content Editors 11/6/2014 State of Illinois Bill Seagle Table of Contents Logging into your site... 2 General Site Structure and

More information

Getting Started with Excel 2008. Table of Contents

Getting Started with Excel 2008. Table of Contents Table of Contents Elements of An Excel Document... 2 Resizing and Hiding Columns and Rows... 3 Using Panes to Create Spreadsheet Headers... 3 Using the AutoFill Command... 4 Using AutoFill for Sequences...

More information

Software Requirement Specification (SRS) for Personal Investment Management System (PIMS)

Software Requirement Specification (SRS) for Personal Investment Management System (PIMS) Software Requirement Specification (SRS) for Personal Investment Management System (PIMS) 1. Introduction 1.1 Purpose: Personal Investment Management System (PIMS) is intended to help the user keep account

More information

MATLAB Functions. function [Out_1,Out_2,,Out_N] = function_name(in_1,in_2,,in_m)

MATLAB Functions. function [Out_1,Out_2,,Out_N] = function_name(in_1,in_2,,in_m) MATLAB Functions What is a MATLAB function? A MATLAB function is a MATLAB program that performs a sequence of operations specified in a text file (called an m-file because it must be saved with a file

More information

J a v a Quiz (Unit 3, Test 0 Practice)

J a v a Quiz (Unit 3, Test 0 Practice) Computer Science S-111a: Intensive Introduction to Computer Science Using Java Handout #11 Your Name Teaching Fellow J a v a Quiz (Unit 3, Test 0 Practice) Multiple-choice questions are worth 2 points

More information

User Guide for the Junior Lab Scheduling Software

User Guide for the Junior Lab Scheduling Software User Guide for the Junior Lab Scheduling Software Introduction................................................................. 1 Reserving Time on Experiments.............................................

More information

SQLITE C/C++ TUTORIAL

SQLITE C/C++ TUTORIAL http://www.tutorialspoint.com/sqlite/sqlite_c_cpp.htm SQLITE C/C++ TUTORIAL Copyright tutorialspoint.com Installation Before we start using SQLite in our C/C++ programs, we need to make sure that we have

More information

7-1. This chapter explains how to set and use Event Log. 7.1. Overview... 7-2 7.2. Event Log Management... 7-2 7.3. Creating a New Event Log...

7-1. This chapter explains how to set and use Event Log. 7.1. Overview... 7-2 7.2. Event Log Management... 7-2 7.3. Creating a New Event Log... 7-1 7. Event Log This chapter explains how to set and use Event Log. 7.1. Overview... 7-2 7.2. Event Log Management... 7-2 7.3. Creating a New Event Log... 7-6 7-2 7.1. Overview The following are the basic

More information

Lecture 3. Arrays. Name of array. c[0] c[1] c[2] c[3] c[4] c[5] c[6] c[7] c[8] c[9] c[10] c[11] Position number of the element within array c

Lecture 3. Arrays. Name of array. c[0] c[1] c[2] c[3] c[4] c[5] c[6] c[7] c[8] c[9] c[10] c[11] Position number of the element within array c Lecture 3 Data structures arrays structs C strings: array of chars Arrays as parameters to functions Multiple subscripted arrays Structs as parameters to functions Default arguments Inline functions Redirection

More information

Sample CSE8A midterm Multiple Choice (circle one)

Sample CSE8A midterm Multiple Choice (circle one) Sample midterm Multiple Choice (circle one) (2 pts) Evaluate the following Boolean expressions and indicate whether short-circuiting happened during evaluation: Assume variables with the following names

More information

Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2

Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2 Unix Shell Scripts Norman Matloff July 30, 2008 Contents 1 Introduction 1 2 Invoking Shell Scripts 2 2.1 Direct Interpretation....................................... 2 2.2 Indirect Interpretation......................................

More information

Tutorial on C Language Programming

Tutorial on C Language Programming Tutorial on C Language Programming Teodor Rus rus@cs.uiowa.edu The University of Iowa, Department of Computer Science Introduction to System Software p.1/64 Tutorial on C programming C program structure:

More information

Special Notice. Rules. Weiss Schwarz Comprehensive Rules ver. 1.64 Last updated: October 15 th 2014. 1. Outline of the Game

Special Notice. Rules. Weiss Schwarz Comprehensive Rules ver. 1.64 Last updated: October 15 th 2014. 1. Outline of the Game Weiss Schwarz Comprehensive Rules ver. 1.64 Last updated: October 15 th 2014 Contents Page 1. Outline of the Game. 1 2. Characteristics of a Card. 2 3. Zones of the Game... 4 4. Basic Concept... 6 5. Setting

More information

Comp151. Definitions & Declarations

Comp151. Definitions & Declarations Comp151 Definitions & Declarations Example: Definition /* reverse_printcpp */ #include #include using namespace std; int global_var = 23; // global variable definition void reverse_print(const

More information

Study Skills. Multiple Choice Tests & Exams. Mount Allison University

Study Skills. Multiple Choice Tests & Exams. Mount Allison University Study Skills Multiple Choice Tests & Exams Mount Allison University Challenges in Preparing for Multiple Choice Tests & Exams Anxiety Time-constraints Volume of material covered Misconceptions about the

More information

Before you can use the Duke Ambient environment to start working on your projects or

Before you can use the Duke Ambient environment to start working on your projects or Using Ambient by Duke Curious 2004 preparing the environment Before you can use the Duke Ambient environment to start working on your projects or labs, you need to make sure that all configuration settings

More information

1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.

1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier. Study Group 1 Variables and Types 1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier. 2. What does the byte 00100110 represent? 3. What is the purpose of the declarations

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

User s Guide for the Texas Assessment Management System

User s Guide for the Texas Assessment Management System User s Guide for the Texas Assessment Management System Version 8.3 Have a question? Contact Pearson s Austin Operations Center. Call 800-627-0225 for technical support Monday Friday, 7:30 am 5:30 pm (CT),

More information

C++FA 5.1 PRACTICE MID-TERM EXAM

C++FA 5.1 PRACTICE MID-TERM EXAM C++FA 5.1 PRACTICE MID-TERM EXAM This practicemid-term exam covers sections C++FA 1.1 through C++FA 1.4 of C++ with Financial Applications by Ben Van Vliet, available at www.benvanvliet.net. 1.) A pointer

More information

Notes on Excel Forecasting Tools. Data Table, Scenario Manager, Goal Seek, & Solver

Notes on Excel Forecasting Tools. Data Table, Scenario Manager, Goal Seek, & Solver Notes on Excel Forecasting Tools Data Table, Scenario Manager, Goal Seek, & Solver 2001-2002 1 Contents Overview...1 Data Table Scenario Manager Goal Seek Solver Examples Data Table...2 Scenario Manager...8

More information

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Directions: In mobile Applications the Control Model View model works to divide the work within an application.

More information

Excel 2007 Basic knowledge

Excel 2007 Basic knowledge Ribbon menu The Ribbon menu system with tabs for various Excel commands. This Ribbon system replaces the traditional menus used with Excel 2003. Above the Ribbon in the upper-left corner is the Microsoft

More information

INTRODUCTION TO EXCEL

INTRODUCTION TO EXCEL INTRODUCTION TO EXCEL 1 INTRODUCTION Anyone who has used a computer for more than just playing games will be aware of spreadsheets A spreadsheet is a versatile computer program (package) that enables you

More information

ECDL / ICDL Spreadsheets Syllabus Version 5.0

ECDL / ICDL Spreadsheets Syllabus Version 5.0 ECDL / ICDL Spreadsheets Syllabus Version 5.0 Purpose This document details the syllabus for ECDL / ICDL Spreadsheets. The syllabus describes, through learning outcomes, the knowledge and skills that a

More information

CPSC 2800 Linux Hands-on Lab #7 on Linux Utilities. Project 7-1

CPSC 2800 Linux Hands-on Lab #7 on Linux Utilities. Project 7-1 CPSC 2800 Linux Hands-on Lab #7 on Linux Utilities Project 7-1 In this project you use the df command to determine usage of the file systems on your hard drive. Log into user account for this and the following

More information

Arrays in Java. Working with Arrays

Arrays in Java. Working with Arrays Arrays in Java So far we have talked about variables as a storage location for a single value of a particular data type. We can also define a variable in such a way that it can store multiple values. Such

More information

Student Applications Help

Student Applications Help Student Applications Help Understanding your Student Landing Page When you log into YES, Your Enrollment Services, you will enter the student landing page. This page will launch you to your academic applications.

More information

Lecture 4: Writing shell scripts

Lecture 4: Writing shell scripts Handout 5 06/03/03 1 Your rst shell script Lecture 4: Writing shell scripts Shell scripts are nothing other than les that contain shell commands that are run when you type the le at the command line. That

More information

Trading Integration for ViTrade

Trading Integration for ViTrade ViTrader Trading Integration for ViTrade TeleTrader Software GmbH Contents First Steps with the ViTrade Trading Integration 3 Accessing Your Portfolio 6 Creating Portfolios... 7 Logging In to a Portfolio...

More information

The Pointless Machine and Escape of the Clones

The Pointless Machine and Escape of the Clones MATH 64091 Jenya Soprunova, KSU The Pointless Machine and Escape of the Clones The Pointless Machine that operates on ordered pairs of positive integers (a, b) has three modes: In Mode 1 the machine adds

More information

Lecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists

Lecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists Lecture 11 Doubly Linked Lists & Array of Linked Lists In this lecture Doubly linked lists Array of Linked Lists Creating an Array of Linked Lists Representing a Sparse Matrix Defining a Node for a Sparse

More information

LEARNING MANAGEMENT SYSTEM USER GUIDE: TURNITIN GRADEMARK RUBRICS

LEARNING MANAGEMENT SYSTEM USER GUIDE: TURNITIN GRADEMARK RUBRICS LEARNING MANAGEMENT SYSTEM USER GUIDE: TURNITIN GRADEMARK RUBRICS Any subject that has a Turnitin assignment can have a rubric added to assist in quick and consistent marking and feedback to students.

More information

Time Sheet Instructions

Time Sheet Instructions Time Sheet Instructions Created by: Ashley Martz, Senior Student Program Assistant; Rebecca Makas, Peer Mentor/Tutor Revised by: Welby Seely, TAC Co-Chair Time Sheet Policies: 1. The program assistant

More information

Boolean Expressions 1. In C++, the number 0 (zero) is considered to be false, all other numbers are true.

Boolean Expressions 1. In C++, the number 0 (zero) is considered to be false, all other numbers are true. Boolean Expressions Boolean Expressions Sometimes a programmer would like one statement, or group of statements to execute only if certain conditions are true. There may be a different statement, or group

More information

CSCI110: Examination information.

CSCI110: Examination information. CSCI110: Examination information. The exam for CSCI110 will consist of short answer questions. Most of them will require a couple of sentences of explanation of a concept covered in lectures or practical

More information

CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals

CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals 1 Recall From Last Time: Java Program import java.util.scanner; public class EggBasket { public static void main(string[]

More information

/* File: blkcopy.c. size_t n

/* File: blkcopy.c. size_t n 13.1. BLOCK INPUT/OUTPUT 505 /* File: blkcopy.c The program uses block I/O to copy a file. */ #include main() { signed char buf[100] const void *ptr = (void *) buf FILE *input, *output size_t

More information

A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION

A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION Tao Chen 1, Tarek Sobh 2 Abstract -- In this paper, a software application that features the visualization of commonly used

More information

This is great when speed is important and relatively few words are necessary, but Max would be a terrible language for writing a text editor.

This is great when speed is important and relatively few words are necessary, but Max would be a terrible language for writing a text editor. Dealing With ASCII ASCII, of course, is the numeric representation of letters used in most computers. In ASCII, there is a number for each character in a message. Max does not use ACSII very much. In the

More information

CP Lab 2: Writing programs for simple arithmetic problems

CP Lab 2: Writing programs for simple arithmetic problems Computer Programming (CP) Lab 2, 2015/16 1 CP Lab 2: Writing programs for simple arithmetic problems Instructions The purpose of this Lab is to guide you through a series of simple programming problems,

More information

Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved.

Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved. 1 2 Introduction to Java Applications 2.2 First Program in Java: Printing a Line of Text 2 Application Executes when you use the java command to launch the Java Virtual Machine (JVM) Sample program Displays

More information

The Technology Behind a Graphical User Interface for an Equational Reasoning Assistant

The Technology Behind a Graphical User Interface for an Equational Reasoning Assistant The Technology Behind a Graphical User Interface for an Equational Reasoning Assistant Andy Gill Department of Computing Science, University of Glasgow Abstract The Haskell Equational Reasoning Assistant

More information

SPSS INSTRUCTION CHAPTER 1

SPSS INSTRUCTION CHAPTER 1 SPSS INSTRUCTION CHAPTER 1 Performing the data manipulations described in Section 1.4 of the chapter require minimal computations, easily handled with a pencil, sheet of paper, and a calculator. However,

More information

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules IBM Operational Decision Manager Version 8 Release 5 Getting Started with Business Rules Note Before using this information and the product it supports, read the information in Notices on page 43. This

More information

Basic Firewall Lab. Lab Objectives. Configuration

Basic Firewall Lab. Lab Objectives. Configuration Basic Firewall Lab Firewalls are devices that filter traffic. Typically they are placed at boundaries between secure and less secure systems or networks. When traffic enters a firewall the firewall compares

More information

CSC230 Getting Starting in C. Tyler Bletsch

CSC230 Getting Starting in C. Tyler Bletsch CSC230 Getting Starting in C Tyler Bletsch What is C? The language of UNIX Procedural language (no classes) Low-level access to memory Easy to map to machine language Not much run-time stuff needed Surprisingly

More information

2011-0920 UM Online Practice Programming Contest September 20, 2011

2011-0920 UM Online Practice Programming Contest September 20, 2011 2011-0920 UM Online Practice Programming Contest September 20, 2011 Sponsored by: University of Michigan Rules: 1. There are a few questions to be solved any time during the tryouts contest. 2. All questions

More information

Introduction to Perl

Introduction to Perl Introduction to Perl March 8, 2011 by Benjamin J. Lynch http://msi.umn.edu/~blynch/tutorial/perl.pdf Outline What Perl Is When Perl Should Be used Basic Syntax Examples and Hands-on Practice More built-in

More information

UTILITY INSTRUCTION MANUAL BNP-B2196 (ENG)

UTILITY INSTRUCTION MANUAL BNP-B2196 (ENG) UTILITY INSTRUCTION MANUAL BNP-B2196 (ENG) MELDASMAGIC is a registered trademark of Mitsubishi Electric Corporation. Microsoft and Windows are registered trademark of Microsoft Corporation in the USA.

More information

Easy Casino Profits. Congratulations!!

Easy Casino Profits. Congratulations!! Easy Casino Profits The Easy Way To Beat The Online Casinos Everytime! www.easycasinoprofits.com Disclaimer The authors of this ebook do not promote illegal, underage gambling or gambling to those living

More information

Calculator Practice: Computation with Fractions

Calculator Practice: Computation with Fractions Calculator Practice: Computation with Fractions Objectives To provide practice adding fractions with unlike denominators and using a calculator to solve fraction problems. www.everydaymathonline.com epresentations

More information

The 2010 British Informatics Olympiad

The 2010 British Informatics Olympiad Time allowed: 3 hours The 2010 British Informatics Olympiad Instructions You should write a program for part (a) of each question, and produce written answers to the remaining parts. Programs may be used

More information

Lecture 2 Mathcad Basics

Lecture 2 Mathcad Basics Operators Lecture 2 Mathcad Basics + Addition, - Subtraction, * Multiplication, / Division, ^ Power ( ) Specify evaluation order Order of Operations ( ) ^ highest level, first priority * / next priority

More information

Andreas Burghart 6 October 2014 v1.0

Andreas Burghart 6 October 2014 v1.0 Yocto Qt Application Development Andreas Burghart 6 October 2014 Contents 1.0 Introduction... 3 1.1 Qt for Embedded Linux... 3 1.2 Outline... 4 1.3 Assumptions... 5 1.4 Corrections... 5 1.5 Version...

More information

VB.NET Programming Fundamentals

VB.NET Programming Fundamentals Chapter 3 Objectives Programming Fundamentals In this chapter, you will: Learn about the programming language Write a module definition Use variables and data types Compute with Write decision-making statements

More information

Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints

Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints Chapter 6 Linear Programming: The Simplex Method Introduction to the Big M Method In this section, we will present a generalized version of the simplex method that t will solve both maximization i and

More information

How to Write a Simple Makefile

How to Write a Simple Makefile Chapter 1 CHAPTER 1 How to Write a Simple Makefile The mechanics of programming usually follow a fairly simple routine of editing source files, compiling the source into an executable form, and debugging

More information

Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration

Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration This JavaScript lab (the last of the series) focuses on indexing, arrays, and iteration, but it also provides another context for practicing with

More information

2 ASCII TABLE (DOS) 3 ASCII TABLE (Window)

2 ASCII TABLE (DOS) 3 ASCII TABLE (Window) 1 ASCII TABLE 2 ASCII TABLE (DOS) 3 ASCII TABLE (Window) 4 Keyboard Codes The Diagram below shows the codes that are returned when a key is pressed. For example, pressing a would return 0x61. If it is

More information

IBM Emulation Mode Printer Commands

IBM Emulation Mode Printer Commands IBM Emulation Mode Printer Commands Section 3 This section provides a detailed description of IBM emulation mode commands you can use with your printer. Control Codes Control codes are one-character printer

More information

Mass Email. General Use

Mass Email. General Use Mass Email The Q Mass Email application allows users to compose and mass email students and/or their contacts. The application will mass send emails based on the selected Sender and creation of a Recipients

More information

LaGuardia Community College 31-10 Thomson Ave, Long Island City, New York 11101 Created by ISMD s Dept. Training Team. Overview

LaGuardia Community College 31-10 Thomson Ave, Long Island City, New York 11101 Created by ISMD s Dept. Training Team. Overview Overview Dreamweaver gives you many options when it comes to setting the properties for your webpages. Within the "Page Properties" dialog box, you can set the appearance of your page, name your page and

More information