Programming Assignment 5 (100 Points) START EARLY!

Size: px
Start display at page:

Download "Programming Assignment 5 (100 Points) START EARLY!"

Transcription

1 Programming Assignment 5 (100 Points) Due: 11:59PM Thursday, November 2 START EARLY! Mining is arduous and dangerous work. Miners need to be taught how to mine minerals in the most efficient manner possible. For this PA, we will be creating a MiningTrainer where various miners will be evaluated on their mining speed and ability to extract the highest value from mineral veins. This program focuses on using interfaces, handling simple exceptions, handling command-line arguments, and reading from files. You will be creating a command-line java application that reads in mineral patterns from a file (or System.in) and processes them through various miners. There are 5 miner classes that we will be writing:,,, OddFirstEvenReverseMiner and. Miner is an interface and must be implemented by all miner classes. MiningTrainer is the command line program that will evaluate the various miners. README ( 10 Points ) You are required to provide a text file named README, NOT Readme.txt, README.pdf, or README.doc, with your assignment in your pa5 directory. There should be no file extension after the file name "README". Your README should include the following sections: Program Description ( 2 points ) : Provide a high level description of what your program does and how you can interact with it. Make this explanation such that your grandmother or uncle or someone you know who has no programming experience can understand what this program does and how to use it. Write your READMEs as if it was intended for a 5 year old. Do not assume your reader is a computer science major. Short Response ( 8 points ) : Answer the following questions in a couple of sentences: 1. (AI) How do you maintain your integrity even when you're stressed, pressured, or tired? 2. Why is so slow? 3. (Unix) What is the difference between Ctrl-C and Ctrl-D? 4. (Unix) How can you determine the number of lines in a file from the command line? (not opening vim) 5. (Unix) How can you determine the last time each file in a directory was edited? 6. (Vim) How do you search for all occurrences of the word taco in vim? (give the 1 line command) 7. (Vim) You have almost finished with PA5 when you realize that you misspelled PA5Strings as PA5strings (incorrect capitalization) in one of your files. In that file, you ve typed PA5strings a lot and so you don t want to have to change every misspelling by hand. What vim command can you use to change all instances of PA5strings to PA5Strings? 8. (Java) What is an interface?

2 STYLE ( 20 points ) Please refer to the style guidelines in the PA2 write-up. Note: Some of the guidelines have changed since PA1. In terms of grading, we will be using the style guidelines in PA2 for the rest of the PAs. CORRECTNESS ( 70 points ) Setting up your PA5 directory: We have provided two starter files for your use. You must copy them to your pa5 directory. mkdir ~/pa5 cp PUBLIC/pa5StarterFiles/PA5Strings.java ~/pa5/ cp PUBLIC/pa5StarterFiles/Miner.java ~/pa5/ Program Overview - About Mining Mineral patterns are modeled as strings. Here are the possible characters in a mineral pattern and their significance. '*' - Gem. The most valuable mineral in the mine. 'O' or 'o' - Ore. The least valuable mineral in the mine. 'X' or 'x' - Empty space. Miners don t want to mine this because they will get a penalty for wasting time (PENALTY). Sample mineral pattern: xoxoxoxox*** Note: All other characters are worth 0, and don t incur a penalty. For instance, if there is a mineral pattern oxmxo*, then the miners will mine the sequence normally, but would get 0 money for mining the m. Each character of the string represents a mining location. To get a character value from a string at a specified index, we can use charat()from the String class. MiningTrainer.java This class is the main driver of the program, where you parse the command line arguments, set up an input stream, create an instance of each miner type, make each miner mine according to their unique algorithm, and finally collect information about their mining time and earnings. Note: To avoid losing points because of mismatch of error messages and any other format strings with the reference output, make sure to use strings provided in PA5Strings.java. Refer to the SAMPLE OUTPUT section (see below) for more details of how the program should behave in different scenarios. Stage 1 : Parse the command line arguments Usage: java MiningTrainer SEED [-i INFILE] All command line options are case-sensitive (-i not -I). SEED is an integer that is to be used as the seed for random number generation -i INFILE : infile is the name of the input file.

3 If the -i flag was provided then it should have only one argument. If infile is put as -, then System.in should be used as the input stream. If the -i flag is not given, System.in is used. Stage 2 : Construct miners, perform mining tasks and print info Create an instance of Scanner class using the input stream. (Hint: you will find Scanner s hasnext() and next() methods helpful for implementing your program.) Create an array of miners. Iterate until the scanner has no more tokens to read and have each miner mine the read in sequence. If the input stream is System.in, print the instructions and prompt before accepting user input (string provided PA5Strings.java). Iterate over the miner array and perform mining tasks for each miner type (,,, and ). Print info about the time taken mining and total earnings for each miner when they finish mining. To print the miner s name, you can use minerobj.getclass().getname() Miner.java This is the interface that defines behaviors of a Miner. We make all Miner types (,,, and ) implement this interface so that they will have common defined behavior (i.e. method names). This makes it really convenient when you, say, want all Miner types to perform the mine() task. Now that they all have the same method named mine(), we can just call mine() for each of them in a simple loop in MinerTrainer. This interface defines the following public methods - 1. int mine(string minerals, int numgems) This method will process the string based on a mining algorithm until the entire string has been explored or all the gems have been found. It will return the time taken to mine all the gems. The miner will stop mining once it has found all the gems. 2. int gettotalearnings() This method returns the total money earned from all the mining operations. 3. default int appraisemineral(char mineral) This method will take in a character and determine its worth. It returns the monetary value of the mineral. Since this is a default method, it will be implemented in the interface itself. (You will have to implement this method yourself)..java This miner takes in a seed that is used to generate random numbers. You need to create a Random object in the constructor based on that seed (see how this was done in PA2Simulator). To begin, implement the mine(string minerals, int numgems) method. works by the following algorithm:

4 1. Pick a random location to mine at by calling nextint()to generate a random integer. 2. If we have already mined that location, apply a penalty (REPEAT_PENALTY = 2) to our total earnings for having wasted time and try a new random location (return to step 1) 3. If we have not mined that location, mark the location as visited, and get the value of the mineral at that location using appraisemineral and add it to the total earnings 4. If there are still gems left to mine, pick a new random location (return to step 1) 5. Return the time taken to mine the mineral sequence. Here are a few things that you need to keep track of: Locations you have already mined (an array might be helpful here). Number of gems found and how many yet to find. Total earnings made by This value does NOT reset each time mine() is called, it should be a running total. The time a takes to mine This value DOES reset each time mine() is called. Each time you pick a new location, the time should increase by MINE_RATE At the end of this method, you should return the time taken to mine all of the gems The last thing you need to do for is to implement the gettotalearnings() method..java This miner will sequentially mine all the EVEN indices in the string (beginning at 0), and then mine all ODD indices (starting at 1). First implement the mine(string minerals, int numgems) method. This method follows the following algorithm: 1. Go through all of the even indices, taking note of the value of each mineral and updating the total earnings accordingly. For each index you visit, the amount of time taken to mine should increase by MINE_RATE. 2. After you have either found all the gems, or visited all of the even indices, start visiting the odd indices. Complete the same process as you did with the even indices. 3. Once you have found all of the gems, or visited every index, the time spent mining should be returned. Lastly, implement the gettotalearnings() method..java The next miner you will be implementing is similar to the previous, except you need to visit the of the ODD indices first, then visit the EVEN indices. As with before, implement the mine() method first, then complete the gettotalearnings() method..java The next miner wants to try something different -- they want to visit all of the odd indices then visit all of the even indices IN REVERSE order.

5 To implement the mine(string minerals, int numgems) method, first visit all of the odd indices as you have done before, then, starting from the last even index, visit every even location in reverse until index 0. Don t forget to complete the gettotalearnings() method..java The last miner is very traditional, they don't want to do any fancy optimizations. This miner will simply visit each mining location in linear order until all of the gems are found, or every location has been mined. As with the other miners, first implement mine(), then complete the gettotalearnings() method. General notes: 1. After you have found all of the gems in the sequence, you should stop looking for more minerals (don't visit another index). 2. The total earnings for each Miner accumulate, this means that you should not reset the total earnings after or before each call to mine(), but earnings should start at 0 before the very first call to mine() 3. Every time you visit an index, you need to increase the total time spent mining by MINE_RATE. Note that this value should start at 0 at the beginning of each call to mine(). Sample Output Note: bolded text is what you type in the terminal. represents command prompts. 1. Command line parsing errors 1.1 Wrong number of arguments java MiningTrainer Usage: java MiningTrainer SEED [-i INFILE] 1.2 Invalid seed java MiningTrainer NotInteger Error: Invalid Integer Seed NotInteger 1.3 Invalid Flag java MiningTrainer o Error: Unrecognized flag -o Usage: java MiningTrainer SEED [-i INFILE]

6 1.4 Missing argument to -i flag java MiningTrainer i Error: Expected argument for -i flag Usage: java MiningTrainer SEED [-i INFILE] 2. User input via System.in 2.1 Program run with a seed value 17 and invalid sequence of minerals entered by the user via stdin: java MiningTrainer 17 Please enter a sequence of minerals. Minerals can be represented by the following characters: x,x: No minerals o,o: Low value ore. *: High value gems. End sequences by pressing the <ENTER> key. Finish by typing ctrl-d > mmmmmm Mining Minerals... mmmmmm Time taken for this sequence: 0 Money earned so far: 0 Time taken for this sequence: 0 Money earned so far: 0 Time taken for this sequence: 0 Money earned so far: 0 Time taken for this sequence: 0 Money earned so far: 0 Time taken for this sequence: 0 Money earned so far: 0 > ^d 2.2 Program run with a seed value 17 and the sequence "xo*" entered by the user via stdin: java MiningTrainer 17 Please enter a sequence of minerals. Minerals can be represented by the following characters: x,x: No minerals o,o: Low value ore. *: High value gems. End sequences by pressing the <ENTER> key. Finish by typing ctrl-d > xo* Mining Minerals...

7 xo* Time taken for this sequence: 8 Money earned so far: 7 Time taken for this sequence: 4 Money earned so far: 5 Time taken for this sequence: 6 Money earned so far: 9 Time taken for this sequence: 4 Money earned so far: 11 Time taken for this sequence: 6 Money earned so far: 9 > ^d 2.3 No input provided ( java MiningTrainer 1234) java MiningTrainer 1234 Please enter a sequence of minerals. Minerals can be represented by the following characters: x,x: No minerals o,o: Low value ore. *: High value gems. End sequences by pressing the <ENTER> key. Finish by typing ctrl-d > ^d 2.4 Input redirected from a file cat infile xooxxo***xooo*x**** java MiningTrainer 1234 < infile Please enter a sequence of minerals. Minerals can be represented by the following characters: x,x: No minerals o,o: Low value ore. *: High value gems. End sequences by pressing the <ENTER> key. Finish by typing ctrl-d > Mining Minerals... xooxxo***xooo*x**** Time taken for this sequence: 62 Money earned so far: 40

8 Time taken for this sequence: 32 > 2.5 Input piped into a different command echo '***oxoxxxxxoo*' java MiningTrainer 1234 Please enter a sequence of minerals. Minerals can be represented by the following characters: x,x: No minerals o,o: Low value ore. *: High value gems. End sequences by pressing the <ENTER> key. Finish by typing ctrl-d > Mining Minerals... ***oxoxxxxxoo* Time taken for this sequence: 126 Money earned so far: -72 Time taken for this sequence: 28 Money earned so far: 32 Time taken for this sequence: 18 Money earned so far: 36 Time taken for this sequence: 28 Money earned so far: 32 Time taken for this sequence: 28 Money earned so far: 32 > 3. User input via file 3.1 Program run with a seed 17 and an input file named infile cat infile xooxxo***xooo*x**** java MiningTrainer 17 -i infile Mining Minerals... xooxxo***xooo*x****

9 Time taken for this sequence: 150 Money earned so far: -42 Time taken for this sequence: File with multiple lines cat infile_multiline oooxoxoxoxox***xoo *xoxoxo***xoxoxxxx java MiningTrainer i infile_multiline Mining Minerals... oooxoxoxoxox***xoo Time taken for this sequence: 36 Money earned so far: 27 Time taken for this sequence: 32 Money earned so far: 43 Time taken for this sequence: 34 Money earned so far: 41 Time taken for this sequence: 24 Money earned so far: 21 Time taken for this sequence: 30 Money earned so far: 39 Mining Minerals... *xoxoxo***xoxoxxxx Time taken for this sequence: 70 Money earned so far: 17 Time taken for this sequence: 28 Money earned so far: 69 Time taken for this sequence: 28 Money earned so far: 79

10 Time taken for this sequence: 36 Money earned so far: 51 Time taken for this sequence: 20 Money earned so far: Empty File touch empty_file java MiningTrainer i empty_file 3.4 File doesn t exist java MiningTrainer i nosuchfile Error: Could not open stream for reading EXTRA CREDIT ( 5 Points ) We have some new miners in town for the training, and they just so happen to be fans of the TV show Silicon Valley. Implement the following 2 Miners: EC_PiedPiperMiner.java (2.5 Points) Implements the famous middle-out algorithm. Starts from the middle and works its way outwards consuming one position per loop. Eg: Given a sequence of length 5, we would visit indices in the following order: 2 -> 1 -> 3 -> 0 -> 4 EC_HooliMiner.java (2.5 Points) Mines from the edges to the middle or until there are no gems left. This miner will mine the edges and then move one index inward on each side. Eg: Given a sequence of length 5, we would visit indices in the following order: 0 -> 4 -> 1 -> 3 -> 2 Create an EC version of MiningTrainer called EC_MiningTrainer.java that appends these miners to the array of regular miners. (Copy MiningTrainer.java to EC_MiningTrainer.java) Remember to switch the usage to EC_USAGE! SAMPLE OUTPUT: java EC_MiningTrainer i infile

11 Mining Minerals... xooxxo***xooo*x**** Time taken for this sequence: 62 Money earned so far: 40 Time taken for this sequence: 32 EC_PiedPiperMiner EC_HooliMiner Time taken for this sequence: 34 Money earned so far: 68 TURNIN Turnin To turnin your code, navigate to your home directory and run the following command: cse11turnin pa5 You may turn in your programming assignment as many times as you like. The last submission you turn in before the deadline is the one that we will collect. Verify To verify a previously turned in assignment, cse11verify pa5 If you are unsure your program has been turned in, use the verify command. We will not take any late files you forgot to turn in. Verify will help you check which files you have successfully submitted. It is your responsibility to make sure you properly turned in your assignment. Files to be collected:.java

12 .java Miner.java MiningTrainer.java.java.java PA5Strings.java.java README Additional files to be collected for Extra Credit: EC_HooliMiner.java EC_PiedPiperMiner.java EC_MiningTrainer.java The files that you turn in (in your pa5 dir) must be EXACTLY the same name as those above, and no other.java source files. Any.java source file in your pa5 directory must compile without error for turnin. NO LATE ASSIGNMENTS ACCEPTED! START EARLY! And above all HAVE FUN!

Programming Assignment 8 ( 100 Points )

Programming Assignment 8 ( 100 Points ) Programming Assignment 8 ( 100 Points ) Due: 11:59pm Wednesday, November 22 Start early Start often! README ( 10 points ) You are required to provide a text file named README, NOT Readme.txt, README.pdf,

More information

Programming Assignment 2 ( 100 Points )

Programming Assignment 2 ( 100 Points ) Programming Assignment 2 ( 100 Points ) Due: Thursday, October 16 by 11:59pm This assignment has two programs: one a Java application that reads user input from the command line (TwoLargest) and one a

More information

Programming Assignment 4 ( 100 Points )

Programming Assignment 4 ( 100 Points ) Programming Assignment 4 ( 100 Points ) Due: 11:59pm Thursday, October 26 START EARLY!! In PA4 you will continue exploring the graphical user interface (GUI) and object oriented programming. You will be

More information

Programming Assignment 7 (100. Points)

Programming Assignment 7 (100. Points) Programming Assignment 7 (100 Points) Due: 11:59pm Thursday, November 16 In this PA, we will be learning about recursion and some of Rick s Vegas wisdom. README ( 10 points ) You are required to provide

More information

Programming Assignment 3 ( 100 Points ) START EARLY!

Programming Assignment 3 ( 100 Points ) START EARLY! Programming Assignment 3 ( 100 Points ) Due: 11:59pm Thursday, October 19 START EARLY! This programming assignment has two programs: 1) a Java application (HourGlass) that displays an hourglass shape on

More information

Programming Assignment 2 ( 100 Points ) Due: Thursday, October 12 by 11:59pm

Programming Assignment 2 ( 100 Points ) Due: Thursday, October 12 by 11:59pm Programming Assignment 2 ( 100 Points ) Due: Thursday, October 12 by 11:59pm PA2 is a two part / two program assignment. The first part involves creating a graphical user interface (GUI) which responds

More information

Programming Assignment 2 (PA2) - DraggingEmoji & ShortLongWords

Programming Assignment 2 (PA2) - DraggingEmoji & ShortLongWords Programming Assignment 2 (PA2) - DraggingEmoji & ShortLongWords Due Date: Wednesday, October 10 @ 11:59 pm Assignment Overview Grading Gathering Starter Files Program 1: DraggingEmoji Program 2: ShortLongWords

More information

This is a combination of a programming assignment and ungraded exercises

This is a combination of a programming assignment and ungraded exercises CSE 11 Winter 2017 Programming Assignment #1 Covers Chapters: ZY 1-3 START EARLY! 100 Pts Due: 25 JAN 2017 at 11:59pm (2359) This is a combination of a programming assignment and ungraded exercises Exercises

More information

Due: 9 February 2017 at 1159pm (2359, Pacific Standard Time)

Due: 9 February 2017 at 1159pm (2359, Pacific Standard Time) CSE 11 Winter 2017 Program Assignment #2 (100 points) START EARLY! Due: 9 February 2017 at 1159pm (2359, Pacific Standard Time) PROGRAM #2: DoubleArray11 READ THE ENTIRE ASSIGNMENT BEFORE STARTING In lecture,

More information

Programming Assignment 4 (PA4) - myxd Milestone Due: Final Due:

Programming Assignment 4 (PA4) - myxd Milestone Due: Final Due: Programming Assignment 4 (PA4) - myxd Milestone Due: Final Due: Wednesday, March 7 @ 11:59 pm Wednesday, March 14 @ 11:59pm Assignment Overview The purpose of this programming assignment is further practice

More information

CMSC 201 Fall 2016 Lab 09 Advanced Debugging

CMSC 201 Fall 2016 Lab 09 Advanced Debugging CMSC 201 Fall 2016 Lab 09 Advanced Debugging Assignment: Lab 09 Advanced Debugging Due Date: During discussion Value: 10 points Part 1: Introduction to Errors Throughout this semester, we have been working

More information

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit. Com S 227 Fall 2018 Miniassignment 1 40 points Due Date: Friday, October 12, 11:59 pm (midnight) Late deadline (25% penalty): Monday, October 15, 11:59 pm General information This assignment is to be done

More information

find starting-directory -name filename -user username

find starting-directory -name filename -user username Lab 7: Input and Output The goal of this lab is to gain proficiency in using I/O redirection to perform tasks on the system. You will combine commands you have learned in this course using shell redirection,

More information

Programming Assignment Multi-Threading and Debugging 2

Programming Assignment Multi-Threading and Debugging 2 Programming Assignment Multi-Threading and Debugging 2 Due Date: Friday, June 1 @ 11:59 pm PAMT2 Assignment Overview The purpose of this mini-assignment is to continue your introduction to parallel programming

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2018 Assignment 1 100 points Due Date: Friday, September 14, 11:59 pm (midnight) Late deadline (25% penalty): Monday, September 17, 11:59 pm General information This assignment is to be

More information

Programming Assignment 3 (PA3) - Popular Names

Programming Assignment 3 (PA3) - Popular Names Programming Assignment 3 (PA3) - Popular Names Milestone Due: Final Due: Wednesday, May 16 @ 11:59 pm Wednesday, May 23 @ 11:59 pm Example Input Milestone Functions Unit Testing Extra Credit Detailed Overview

More information

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit. Com S 227 Spring 2018 Miniassignment 1 40 points Due Date: Thursday, March 8, 11:59 pm (midnight) Late deadline (25% penalty): Friday, March 9, 11:59 pm General information This assignment is to be done

More information

EECE.2160: ECE Application Programming

EECE.2160: ECE Application Programming Spring 2018 Programming Assignment #10: Instruction Decoding and File I/O Due Wednesday, 5/9/18, 11:59:59 PM (Extra credit ( 4 pts on final average), no late submissions or resubmissions) 1. Introduction

More information

Project 1: Implementation of the Stack ADT and Its Application

Project 1: Implementation of the Stack ADT and Its Application Project 1: Implementation of the Stack ADT and Its Application Dr. Hasmik Gharibyan Deadlines: submit your files via handin by midnight (end of the day) on Thursday, 10/08/15. Late submission: submit your

More information

Lab 03 - x86-64: atoi

Lab 03 - x86-64: atoi CSCI0330 Intro Computer Systems Doeppner Lab 03 - x86-64: atoi Due: October 1, 2017 at 4pm 1 Introduction 1 2 Assignment 1 2.1 Algorithm 2 3 Assembling and Testing 3 3.1 A Text Editor, Makefile, and gdb

More information

CS451 - Assignment 3 Perceptron Learning Algorithm

CS451 - Assignment 3 Perceptron Learning Algorithm CS451 - Assignment 3 Perceptron Learning Algorithm Due: Sunday, September 29 by 11:59pm For this assignment we will be implementing some of the perceptron learning algorithm variations and comparing both

More information

Programming Assignment 1: CS11TurtleGraphics

Programming Assignment 1: CS11TurtleGraphics Programming Assignment 1: CS11TurtleGraphics Due: 11:59pm, Thursday, October 5 Overview You will use simple turtle graphics to create a three-line drawing consisting of the following text, where XXX should

More information

Lab 1 Introduction to UNIX and C

Lab 1 Introduction to UNIX and C Name: Lab 1 Introduction to UNIX and C This first lab is meant to be an introduction to computer environments we will be using this term. You must have a Pitt username to complete this lab. The doc is

More information

CS143 Handout 05 Summer 2011 June 22, 2011 Programming Project 1: Lexical Analysis

CS143 Handout 05 Summer 2011 June 22, 2011 Programming Project 1: Lexical Analysis CS143 Handout 05 Summer 2011 June 22, 2011 Programming Project 1: Lexical Analysis Handout written by Julie Zelenski with edits by Keith Schwarz. The Goal In the first programming project, you will get

More information

CpSc 1011 Lab 5 Conditional Statements, Loops, ASCII code, and Redirecting Input Characters and Hurricanes

CpSc 1011 Lab 5 Conditional Statements, Loops, ASCII code, and Redirecting Input Characters and Hurricanes CpSc 1011 Lab 5 Conditional Statements, Loops, ASCII code, and Redirecting Input Characters and Hurricanes Overview For this lab, you will use: one or more of the conditional statements explained below

More information

There are several files including the start of a unit test and the method stubs in MindNumber.java. Here is a preview of what you will do:

There are several files including the start of a unit test and the method stubs in MindNumber.java. Here is a preview of what you will do: Project MindNumber Collaboration: Solo. Complete this project by yourself with optional help from section leaders. Do not work with anyone else, do not copy any code directly, do not copy code indirectly

More information

CS164: Programming Assignment 5 Decaf Semantic Analysis and Code Generation

CS164: Programming Assignment 5 Decaf Semantic Analysis and Code Generation CS164: Programming Assignment 5 Decaf Semantic Analysis and Code Generation Assigned: Sunday, November 14, 2004 Due: Thursday, Dec 9, 2004, at 11:59pm No solution will be accepted after Sunday, Dec 12,

More information

Programming Assignment I Due Thursday, October 9, 2008 at 11:59pm

Programming Assignment I Due Thursday, October 9, 2008 at 11:59pm Programming Assignment I Due Thursday, October 9, 2008 at 11:59pm 1 Overview Programming assignments I IV will direct you to design and build a compiler for Cool. Each assignment will cover one component

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2018 Assignment 1 80 points Due Date: Friday, February 2, 11:59 pm (midnight) Late deadline (25% penalty): Monday, February 5, 11:59 pm General information This assignment is to be done

More information

Programming Assignment I Due Thursday, October 7, 2010 at 11:59pm

Programming Assignment I Due Thursday, October 7, 2010 at 11:59pm Programming Assignment I Due Thursday, October 7, 2010 at 11:59pm 1 Overview of the Programming Project Programming assignments I IV will direct you to design and build a compiler for Cool. Each assignment

More information

Spring 2012 Homework 10

Spring 2012 Homework 10 15-150 Spring 2012 Homework 10 Out: 24 April, 2012 Due: 2 May, 2012, 0900 EST 1 Introduction This homework will give you additional practice with imperative programming in SML. It is slightly short to

More information

Important Project Dates

Important Project Dates Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2002 Handout 4 Project Overview Wednesday, September 4 This is an overview of the course project

More information

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one] Data and Computer Security (CMPD414) Lab II Topics: secure login, moving into HOME-directory, navigation on Unix, basic commands for vi, Message Digest This lab exercise is to be submitted at the end of

More information

Homework 7: Subsets Due: 11:59 PM, Oct 23, 2018

Homework 7: Subsets Due: 11:59 PM, Oct 23, 2018 CS17 Integrated Introduction to Computer Science Klein Contents Homework 7: Subsets Due: 11:59 PM, Oct 23, 2018 1 Bookends (Practice) 2 2 Subsets 3 3 Subset Sum 4 4 k-subsets 5 5 k-subset Sum 5 Objectives

More information

CS451 - Assignment 8 Faster Naive Bayes? Say it ain t so...

CS451 - Assignment 8 Faster Naive Bayes? Say it ain t so... CS451 - Assignment 8 Faster Naive Bayes? Say it ain t so... Part 1 due: Friday, Nov. 8 before class Part 2 due: Monday, Nov. 11 before class Part 3 due: Sunday, Nov. 17 by 11:50pm http://www.hadoopwizard.com/what-is-hadoop-a-light-hearted-view/

More information

Lab 4 - Linked Lists

Lab 4 - Linked Lists UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING Introduction CMPE-13/L: COMPUTER SYSTEMS AND C PROGRAMMING WINTER 2014 Lab 4 - Linked Lists This lab introduces the concept

More information

Programming Project 1: Lexical Analyzer (Scanner)

Programming Project 1: Lexical Analyzer (Scanner) CS 331 Compilers Fall 2017 Programming Project 1: Lexical Analyzer (Scanner) Prof. Szajda Due Thursday, September 21, 11:59:59 pm 1 Overview of the Programming Project Programming projects I IV will direct

More information

ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists

ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists COMP-202B, Winter 2009, All Sections Due: Tuesday, April 14, 2009 (23:55) You MUST do this assignment individually and, unless otherwise

More information

Lab 1 Introduction to UNIX and C

Lab 1 Introduction to UNIX and C Name: Lab 1 Introduction to UNIX and C This first lab is meant to be an introduction to computer environments we will be using this term. You must have a Pitt username to complete this lab. NOTE: Text

More information

Graduate-Credit Programming Project

Graduate-Credit Programming Project Graduate-Credit Programming Project Due by 11:59 p.m. on December 14 Overview For this project, you will: develop the data structures associated with Huffman encoding use these data structures and the

More information

Practical Session 0 Introduction to Linux

Practical Session 0 Introduction to Linux School of Computer Science and Software Engineering Clayton Campus, Monash University CSE2303 and CSE2304 Semester I, 2001 Practical Session 0 Introduction to Linux Novell accounts. Every Monash student

More information

Due Friday, March 20 at 11:59 p.m. Write and submit one Java program, Sequence.java, as described on the next page.

Due Friday, March 20 at 11:59 p.m. Write and submit one Java program, Sequence.java, as described on the next page. CS170 Section 5 HW #3 Due Friday, March 20 at 11:59 p.m. Write and submit one Java program, Sequence.java, as described on the next page. The assignment should be submitted on the Math/CS system (from

More information

Command Line Interface The basics

Command Line Interface The basics Command Line Interface The basics Marco Berghoff, SCC, KIT Steinbuch Centre for Computing (SCC) Funding: www.bwhpc-c5.de Motivation In the Beginning was the Command Line by Neal Stephenson In contrast

More information

Lab 5 - Linked Lists Git Tag: Lab5Submission

Lab 5 - Linked Lists Git Tag: Lab5Submission UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE-13/L: COMPUTER SYSTEMS AND C PROGRAMMING WINTER 2016 Lab 5 - Linked Lists Git Tag: Lab5Submission Introduction This lab

More information

CS 116. Lab Assignment # 1 1

CS 116. Lab Assignment # 1 1 Points: 2 Submission CS 116 Lab Assignment # 1 1 o Deadline: Friday 02/05 11:59 PM o Submit on Blackboard under assignment Lab1. Please make sure that you click the Submit button and not just Save. Late

More information

CS 463 Project 1 Imperative/OOP Fractals

CS 463 Project 1 Imperative/OOP Fractals CS 463 Project 1 Imperative/OOP Fractals The goal of a couple of our projects is to compare a simple project across different programming paradigms. This semester, we will calculate the Mandelbrot Set

More information

Lab: Supplying Inputs to Programs

Lab: Supplying Inputs to Programs Steven Zeil May 25, 2013 Contents 1 Running the Program 2 2 Supplying Standard Input 4 3 Command Line Parameters 4 1 In this lab, we will look at some of the different ways that basic I/O information can

More information

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department CPCS204, 3 rd Term 2014 (Summer) Program1: FCIT Samba Bank Assigned: Wednesday June 11 th, 2014 Due:

More information

EECE.2160: ECE Application Programming

EECE.2160: ECE Application Programming Fall 2017 Programming Assignment #10: Doubly-Linked Lists Due Monday, 12/18/17, 11:59:59 PM (Extra credit ( 5 pts on final average), no late submissions or resubmissions) 1. Introduction This assignment

More information

CS52 - Assignment 8. Due Friday 4/15 at 5:00pm.

CS52 - Assignment 8. Due Friday 4/15 at 5:00pm. CS52 - Assignment 8 Due Friday 4/15 at 5:00pm https://xkcd.com/859/ This assignment is about scanning, parsing, and evaluating. It is a sneak peak into how programming languages are designed, compiled,

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2017 Assignment 1 80 points Due Date: Thursday, February 2, 11:59 pm (midnight) Late deadline (25% penalty): Friday, February 3, 11:59 pm General information This assignment is to be done

More information

Fall CSEE W4119 Computer Networks Programming Assignment 1 - Simple Online Bidding System

Fall CSEE W4119 Computer Networks Programming Assignment 1 - Simple Online Bidding System Fall 2012 - CSEE W4119 Computer Networks Programming Assignment 1 - Simple Online Bidding System Prof. Gil Zussman due: Wed. 10/24/2012, 23:55 EST 1 Introduction In this programming assignment, you are

More information

CMSC 201 Spring 2017 Lab 01 Hello World

CMSC 201 Spring 2017 Lab 01 Hello World CMSC 201 Spring 2017 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 5th by 8:59:59 PM Value: 10 points At UMBC, our General Lab (GL) system is designed to grant students the

More information

CMSC 150 INTRODUCTION TO COMPUTING LAB WEEK 3 STANDARD IO FORMATTING OUTPUT SCANNER REDIRECTING

CMSC 150 INTRODUCTION TO COMPUTING LAB WEEK 3 STANDARD IO FORMATTING OUTPUT SCANNER REDIRECTING CMSC 150 INTRODUCTION TO COMPUTING LAB WEEK 3 STANDARD IO FORMATTING OUTPUT SCANNER REDIRECTING INPUT AND OUTPUT Input devices Keyboard Mouse Hard drive Network Digital camera Microphone Output devices.

More information

Introduction to Linux

Introduction to Linux Introduction to Linux The command-line interface A command-line interface (CLI) is a type of interface, that is, a way to interact with a computer. Window systems, punched cards or a bunch of dials, buttons

More information

Assignment 3 ITCS-6010/8010: Cloud Computing for Data Analysis

Assignment 3 ITCS-6010/8010: Cloud Computing for Data Analysis Assignment 3 ITCS-6010/8010: Cloud Computing for Data Analysis Due by 11:59:59pm on Tuesday, March 16, 2010 This assignment is based on a similar assignment developed at the University of Washington. Running

More information

CMSC 201 Spring 2018 Project 3 Minesweeper

CMSC 201 Spring 2018 Project 3 Minesweeper CMSC 201 Spring 2018 Project 3 Minesweeper Assignment: Project 3 Minesweeper Due Date: Design Document: Friday, May 4th, 2018 by 8:59:59 PM Project: Friday, May 11th, 2018 by 8:59:59 PM Value: 80 points

More information

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used: Linux Tutorial How to read the examples When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used: $ application file.txt

More information

CpSc 111 Lab 5 Conditional Statements, Loops, the Math Library, and Redirecting Input

CpSc 111 Lab 5 Conditional Statements, Loops, the Math Library, and Redirecting Input CpSc Lab 5 Conditional Statements, Loops, the Math Library, and Redirecting Input Overview For this lab, you will use: one or more of the conditional statements explained below scanf() or fscanf() to read

More information

Homework 6: Higher-Order Procedures Due: 11:59 PM, Oct 16, 2018

Homework 6: Higher-Order Procedures Due: 11:59 PM, Oct 16, 2018 Integrated Introduction to Computer Science Klein Homework 6: Higher-Order Procedures Due: 11:59 PM, Oct 16, 2018 Contents 1 Fun with map (Practice) 2 2 Unfold (Practice) 3 3 Map2 3 4 Fold 4 5 All You

More information

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab Basic Terminal Intro to Linux ssh short for s ecure sh ell usage: ssh [host]@[computer].[otheripstuff] for lab computers: ssh [CSID]@[comp].cs.utexas.edu can get a list of active computers from the UTCS

More information

CS61BL: Data Structures & Programming Methodology Summer Project 1: Dots!

CS61BL: Data Structures & Programming Methodology Summer Project 1: Dots! CS61BL: Data Structures & Programming Methodology Summer 2014 Project 1: Dots! Note on compiling Board.java You will not be able to compile Board.java until you make your own CantRemoveException class.

More information

Shell Programming (Part 2)

Shell Programming (Part 2) i i Systems and Internet Infrastructure Security Institute for Networking and Security Research Department of Computer Science and Engineering Pennsylvania State University, University Park, PA Shell Programming

More information

Deliverables. Problem Description

Deliverables. Problem Description Deliverables Programming Project: GridWorld Due dates: Part I: June 28 at the beginning of class (hardcopy) Part II: Jun 5 at the beginning of class (electronic submission) In this project you will design

More information

Programming Assignment #3 Event Driven Simulation

Programming Assignment #3 Event Driven Simulation CS-2303, System Programming Concepts, A-term 2012 Project 3 (45 points) Assigned: Friday, September 7, 2012 Due: Friday, September 14, 2012, 11:59 PM Abstract Programming Assignment #3 Event Driven Simulation

More information

Programming Assignment 1 (PA1) - Display Bowtie

Programming Assignment 1 (PA1) - Display Bowtie Programming Assignment 1 (PA1) - Display Bowtie Milestone Due: Final Due: Wednesday, April 18 @ 11:59 pm Wednesday, April 25 @ 11:59 pm Example Input Milestone Functions Unit Testing Extra Credit Detailed

More information

CSE 401/M501 18au Midterm Exam 11/2/18. Name ID #

CSE 401/M501 18au Midterm Exam 11/2/18. Name ID # Name ID # There are 7 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 books, closed notes,

More information

CSE115 Lab 9 Fall 2016

CSE115 Lab 9 Fall 2016 DUE DATES: Monday recitations: 8:00 PM on 11/13 Wednesday recitations: 8:00 PM on 11/15 Thursday recitations: 8:00 PM on 11/16 Friday recitations: 8:00 PM on 11/17 Saturday recitations: 8:00 PM on 11/18

More information

CS 553 Compiler Construction Fall 2006 Project #4 Garbage Collection Due November 27, 2005

CS 553 Compiler Construction Fall 2006 Project #4 Garbage Collection Due November 27, 2005 CS 553 Compiler Construction Fall 2006 Project #4 Garbage Collection Due November 27, 2005 In this assignment you will implement garbage collection for the MiniJava compiler. The project includes the two

More information

Programming Assignment 1

Programming Assignment 1 CS 276 / LING 286 Spring 2017 Programming Assignment 1 Due: Thursday, April 20, 2017 at 11:59pm Overview In this programming assignment, you will be applying knowledge that you have learned from lecture

More information

// class variable that gives the path where my text files are public static final String path = "C:\\java\\sampledir\\PS10"

// class variable that gives the path where my text files are public static final String path = C:\\java\\sampledir\\PS10 Problem Set 10 Due: 4:30PM, Friday May 10, 2002 Problem 1. Files and hashing, preliminary question (30%) This problem focuses on the use of the hashcode() method, and touches on the tostring() and equals()

More information

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

3. A Periodic Alarm: intdate.c & sigsend.c

3. A Periodic Alarm: intdate.c & sigsend.c p6: Signal Handling 1. Logistics 1. This project must be done individually. It is academic misconduct to share your work with others in any form including posting it on publicly accessible web sites, such

More information

Lab 3 : Sort program

Lab 3 : Sort program Lab : Sort program Introduction Your pointy haired Dilbert manager decided to write a Sort program which you have now inherited. The Sort program intends to emulate the main functionality of the GNU sort

More information

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016 Linux Boot Camp Jack, Matthew, Nishad, Stanley 6 Sep 2016 1 Connecting SSH Windows users: MobaXterm, PuTTY, SSH Tectia Mac & Linux users: Terminal (Just type ssh) andrewid@shark.ics.cs.cmu.edu 2 Let s

More information

ASSIGNMENT 5 Objects, Files, and More Garage Management

ASSIGNMENT 5 Objects, Files, and More Garage Management ASSIGNMENT 5 Objects, Files, and More Garage Management COMP-202B, Winter 2010, All Sections Due: Wednesday, April 14, 2009 (23:55) You MUST do this assignment individually and, unless otherwise specified,

More information

Reading and manipulating files

Reading and manipulating files Reading and manipulating files Goals By the end of this lesson you will be able to Read files without using text editors Access specific parts of files Count the number of words and lines in a file Sort

More information

CMSC 201 Spring 2018 Lab 01 Hello World

CMSC 201 Spring 2018 Lab 01 Hello World CMSC 201 Spring 2018 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 4th by 8:59:59 PM Value: 10 points At UMBC, the GL system is designed to grant students the privileges

More information

CS 1510: Intro to Computing - Fall 2017 Assignment 8: Tracking the Greats of the NBA

CS 1510: Intro to Computing - Fall 2017 Assignment 8: Tracking the Greats of the NBA CS 1510: Intro to Computing - Fall 2017 Assignment 8: Tracking the Greats of the NBA Code Due: Tuesday, November 7, 2017, by 11:59 p.m. The Assignment The purpose of this assignment is to give you more

More information

Lab 4: On Lists and Light Sabers

Lab 4: On Lists and Light Sabers Lab 4: On Lists and Light Sabers Due: March 19th at 11:59pm Overview The goal of this lab is to familiarize yourself with the usage of Lists and their implementations, Array List and Linked. To do so,

More information

Cosc 242 Assignment. Due: 4pm Friday September 15 th 2017

Cosc 242 Assignment. Due: 4pm Friday September 15 th 2017 Cosc 242 Assignment Due: 4pm Friday September 15 th 2017 Group work For this assignment we require you to work in groups of three people. You may select your own group and inform us of your choice via

More information

Part I: Written Problems

Part I: Written Problems CSci 4223 Homework 1 DUE: Friday, February 1, 11:59 pm Instructions. Your task is to answer three written problems, and to write eleven SML functions related to calendar dates, as well as test cases for

More information

CMSC162 Intro to Algorithmic Design II Blaheta. Lab March 2019

CMSC162 Intro to Algorithmic Design II Blaheta. Lab March 2019 CMSC162 Intro to Algorithmic Design II Blaheta Lab 10 28 March 2019 This week we ll take a brief break from the Set library and revisit a class we saw way back in Lab 4: Card, representing playing cards.

More information

Decaf PP2: Syntax Analysis

Decaf PP2: Syntax Analysis Decaf PP2: Syntax Analysis Date Assigned: 10/10/2013 Date Due: 10/25/2013 11:59pm 1 Goal In this programming project, you will extend the Decaf compiler to handle the syntax analysis phase, the second

More information

Lab 1 Implementing a Simon Says Game

Lab 1 Implementing a Simon Says Game ECE2049 Embedded Computing in Engineering Design Lab 1 Implementing a Simon Says Game In the late 1970s and early 1980s, one of the first and most popular electronic games was Simon by Milton Bradley.

More information

CS159 - Assignment 2b

CS159 - Assignment 2b CS159 - Assignment 2b Due: Tuesday, Sept. 23 at 2:45pm For the main part of this assignment we will be constructing a number of smoothed versions of a bigram language model and we will be evaluating its

More information

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes CSE 390a Lecture 2 Exploring Shell Commands, Streams, Redirection, and Processes slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture

More information

Lab 1 Implementing a Simon Says Game

Lab 1 Implementing a Simon Says Game ECE2049 Embedded Computing in Engineering Design Lab 1 Implementing a Simon Says Game In the late 1970s and early 1980s, one of the first and most popular electronic games was Simon by Milton Bradley.

More information

PROGRAMMING PROJECT ONE DEVELOPING A SHELL

PROGRAMMING PROJECT ONE DEVELOPING A SHELL PROGRAMMING PROJECT ONE DEVELOPING A SHELL William Stallings Copyright 2011 Supplement to Operating Systems, Seventh Edition Prentice Hall 2011 ISBN: 013230998X http://williamstallings.com/os/os7e.html

More information

Project 1 Balanced binary

Project 1 Balanced binary CMSC262 DS/Alg Applied Blaheta Project 1 Balanced binary Due: 7 September 2017 You saw basic binary search trees in 162, and may remember that their weakness is that in the worst case they behave like

More information

Homework # 7 DUE: 11:59pm November 15, 2002 NO EXTENSIONS WILL BE GIVEN

Homework # 7 DUE: 11:59pm November 15, 2002 NO EXTENSIONS WILL BE GIVEN Homework #6 CS 450 - Operating Systems October 21, 2002 Homework # 7 DUE: 11:59pm November 15, 2002 NO EXTENSIONS WILL BE GIVEN 1. Overview In this assignment you will implement that FILES module of OSP.

More information

Programming Assignment 2 (PA2) - Binary Clock

Programming Assignment 2 (PA2) - Binary Clock Programming Assignment 2 (PA2) - Binary Clock Milestone Due: Final Due: Wednesday, May 2 @ 11:59 pm Wednesday, May 9 @ 11:59 pm Example Input Milestone Functions Unit Testing Extra Credit Detailed Overview

More information

Homework 6: Higher-Order Procedures Due: 10:00 PM, Oct 17, 2017

Homework 6: Higher-Order Procedures Due: 10:00 PM, Oct 17, 2017 Integrated Introduction to Computer Science Hughes Homework 6: Higher-Order Procedures Due: 10:00 PM, Oct 17, 2017 Contents 1 Fun with map (Practice) 2 2 Unfold (Practice) 3 3 Map2 3 4 Fold 4 5 All You

More information

CIS 505: Software Systems

CIS 505: Software Systems CIS 505: Software Systems Fall 2017 Assignment 3: Chat server Due on November 3rd, 2017, at 10:00pm EDT 1 Overview For this assignment, you will implement a simple replicated chat server that uses multicast

More information

Due: Tuesday 29 November by 11:00pm Worth: 8%

Due: Tuesday 29 November by 11:00pm Worth: 8% CSC 180 H1F Project # 3 General Instructions Fall 2016 Due: Tuesday 29 November by 11:00pm Worth: 8% Submitting your assignment You must hand in your work electronically, using the MarkUs system. Log in

More information

Programming Assignment #4 Arrays and Pointers

Programming Assignment #4 Arrays and Pointers CS-2301, System Programming for Non-majors, B-term 2013 Project 4 (30 points) Assigned: Tuesday, November 19, 2013 Due: Tuesday, November 26, Noon Abstract Programming Assignment #4 Arrays and Pointers

More information

Programming assignment A

Programming assignment A Programming assignment A ASCII Minesweeper Official release on Feb 14 th at 1pm (Document may change before then without notice) Due 5pm Feb 25 th Minesweeper is computer game that was first written in

More information

Fishnet Assignment 1: Distance Vector Routing Due: May 13, 2002.

Fishnet Assignment 1: Distance Vector Routing Due: May 13, 2002. Fishnet Assignment 1: Distance Vector Routing Due: May 13, 2002. In this assignment, you will work in teams of one to four (try to form you own group; if you can t find one, you can either work alone,

More information

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department CPCS202, 1 st Term 2016 (Fall 2015) Program 5: FCIT Grade Management System Assigned: Thursday, December

More information

CSCI 1301: Introduction to Computing and Programming Spring 2018 Project 3: Hangman 2.0 (A Word Guessing Game)

CSCI 1301: Introduction to Computing and Programming Spring 2018 Project 3: Hangman 2.0 (A Word Guessing Game) Introduction In this project, you are going to implement the word guessing game, Hangman 2.0. Your program is going to get a random word from an enumerated list (instructions below) and then let the user

More information