Be sure check the official clarification thread for corrections or updates to this document or to the distributed code.

Size: px
Start display at page:

Download "Be sure check the official clarification thread for corrections or updates to this document or to the distributed code."

Transcription

1 Com S 228 Spring 2011 Programming Assignment 1 Part 1 (75 points): Due at 11:59 pm, Friday, January 28 Part 2 (225 points): Due at 11:59 pm, Monday, February 7 This assignment is to be done on your own. If you need help, see me or one of the TAs. Please make sure you understand the Academic dishonesty section of the syllabus. Please start the assignment as soon as possible and get your questions answered early. Read through this specification completely before you start. This is a new project so there are likely to be problems. Check regularly for updates and clarifications. WebCT The WebCT discussion for Assignment 1 is a good place to post general questions. Please do not post or attach any source code for the assignment. Note that, although in future assignments it may be allowed, for this assignment you may not post any test code on WebCT. Be sure check the official clarification thread for corrections or updates to this document or to the distributed code. Introduction The purpose of this assignment is to give you a chance to review some of the basic skills you learned in Com S 227, to give you some practice working with interfaces and inheritance, and to ensure that you are able to create and run unit tests using the JUnit 4 framework. Much of the code (including all the UI and graphics) is already written, and your code will have to match the specifications in order to integrate correctly with the existing classes. The source code is in the cs228hw1.zip archive. See the section Getting Started for details. Summary of tasks There are two deliverables: Part 1: a complete JUnit 4 test for the LTetromino class, described below Part 2: a working implementation of the CS228Tetris game. The code to be supplied by you will include: 1. A class CS228Tetris extending AbstractBlockGame 2. Concrete implementations of the six Tetromino classes described below (which may include one or more abstract classes) 3. A class PolyominoFactory implementing IPolyominoFactory 4. A class BasicGenerator implementing IPolyominoGenerator

2 Note you will also need to modify the create() method of GameMain so that it constructs an instance of CS228Tetris instead of SampleGame. Overview In this project you will complete the implementation of a simplified Tetris-style or falling blocks type of video game. This particular game, which we ll call CS228Tetris, is a version of Tetris. If you are not familiar with such games, you can read about them on Wikipedia; see The basic idea is as follows. The game is played on a grid with 24 rows and 12 columns. Each location in this grid can be represented as an (x, y) pair (its column and row). We typically represent these locations using the simple class java.awt.point. At any stage in the game, a grid position may be empty or may be occupied by an icon, which for this game is just a colored square, or block. In addition, a shape made up of a combination of blocks, called a polyomino, falls from the top of the grid. This is referred to as the current polyomino. In general the current polyomino can be shifted from side to side using the arrow keys, transformed using the up-arrow key, which may rotate or flip it, cycled by hitting the space bar, which will change the relative positions of the icons, without changing the locations of the cells (this is only noticeable for magic blocks, described later) In addition, the down-arrow can be used to increase the falling speed. When the currently falling polyomino can t fall any further, its blocks are added to the grid, and the game checks whether it has completed a row (or more generally, a collapsible group). All blocks in a collapsible group are removed from the grid and blocks above them are shifted down. A block may also be magic, which works like this: If a row is completed that contains three magic blocks, then gravity comes on for a moment, that is, all blocks with empty cells below them are allowed to fall independently. This normally results in some completed rows, which are then collapsed as usual. The user interface for the project, consisting of the classes in the edu.iastate.cs228.hw1.ui package, uses the Java Swing libraries. However, all the Swing code is already implemented so it is not strictly necessary for you to read and understand it. (Though you might find it interesting.) You should put all your new classes, other than your unit test, in the package edu.iastate.cs228.hw1.impl. Your unit test should be named LTetrominoTest and should be in the package edu.iastate.cs228hw1.test. The IPolyomino interface and the six concrete polyomino types See the javadoc for the IPolyomino interface.

3 The currently falling shape is represented by an object that implements the IPolyomino interface. Each polyomino has a state including The coordinates of its location (center of rotation) The actual icons or blocks that make up the shape The coordinates of the individual blocks (which can change depending on the transform() operation) Most importantly, there is a getcells() method that enables the caller to obtain the actual coordinates of the individual blocks. You will need to create six concrete classes implementing the IPolyomino interface, called the LTetromino, JTetromino, ITriomino, OTetromino, TTetromino, and SZTetromino. It is up to you to decide how to design these classes, but a portion of your grade will be based on how well you avoid duplicated code. Their initial configurations are summarized in the figure below. Every tetromino has a location, shown in the figure as a black dot. For those that rotate, this will also be the center of rotation. The captions describe the individual block coordinates, assuming an initial location at (0, 0). Remember that in this application the y-axis grows downward. The caption also specifies the action of the transform() operation. Figure 1- The six concrete Polyomino types Cell ordering The getcells() method always returns the cells of a polyomino in a fixed order. This ordering is just the reading order (left-to-right, top-to-bottom) when the polyomino is in its initial position, as shown in Figure 1. Note that if the polyomino is transformed, the ordering remains the same (there are more detailed rotation examples in the next section).

4 Figure 2 - cell ordering remains consistent after transform() Rotation examples The first picture below shows an LTetromino in its initial rotation at location (4, 1). The second, third, and fourth pictures show the results of successive invocations of transform(), which (for the LTetromino) results in a counterclockwise rotation about a fixed point. The list of coordinate pairs underneath each picture shows the locations that would be returned by getcells(), in the correct order. Figure 3- Rotations of an LTetromino The next example shows the four rotations of a JTetromino, starting in its initial rotation, again using the hypothetical location (4, 1). Center of rotation (4, 1) (3, 1), (3, 2), (4, 2), (5, 2) (4, 2), (5, 2), (5, 1), (5, 0) (5, 1), (5, 0), (4, 0), (3, 0) (4, 0), (3, 0), (3, 1), (3, 2) Figure 4 - Rotations of a JTetromino Colors, magic, and cycling See the javadoc for the Cell, IGameIcon, and Block classes.

5 A polyomino is made of Cell objects. A Cell encapsulates a location (x, y coordinates) and also an IGameIcon, which is primarily used by the UI as a hint for how to draw a given cell. The relevant methods are java.awt.color getcolorhint(); boolean ismagic(); IGameIcon is implemented by the simple class Block. A Block encapsulates a color and a magic state (which is just a boolean value). The way you associate a color with a Cell is by giving the Cell a Block containing that color for its IGameIcon. The cycle() operation of IPolyomino shifts the IGameIcon objects among the Cells of a polyomino. The cycle() method is invoked when the player presses the space bar. The order of this shifting matches the ordering of the cells returned by getcells(), as described above, that is, the IGameIcon at cell 0 is moved to cell 1, and so on, where the IGameIcon at the last cell is moved to cell 0. The following example shows an LTetromino with one magic icon, designated by the white circle, as cycle() is called 4 times. Figure 5- Invoking cycle() on an LTetromino with one block in the magic state Use the following constants from the java.awt.color class: Color.ORANGE Color.BLUE Color.CYAN Color.YELLOW Color.MAGENTA Color.GREEN Color.RED Equals Each polyomino class must override the equals() method of java.lang.object. Two polyominoes are equal if they have the same type and have equal cells. (The equals() method is already implemented for the Cell class.) Chances are you will be able to implement equals() just once in an abstract superclass. The IGame interface and AbstractBlockGame class See the javadoc for the IGame interface. The class AbstractBlockGame is a partial implementation of the IGame interface. The GUI interacts with the game logic only through the interface IGame and does not depend directly on the

6 AbstractBlockGame class or its subclasses. AbstractBlockGame is a general framework for any number of Tetris-style games. It is specialized by implementing two abstract methods. List<Point> determinecellstocollapse() Examines the grid and returns a list of locations to be collapsed. int determinescore() Returns the current score. The key method of IGame is step(), which is called periodically by the GUI to transition the state of the game. The step() method is fully implemented, and it is not necessary for you to read it in detail unless you are interested. You will just need a basic understanding of how it interacts with the determinecellstocollapse() method that you will implement, described in the next section. You should not modify anything in IGame or AbstractBlockGame. The CS228Tetris class You will create a subclass of AbstractBlockGame, called CS228Tetris, that implements the game described in the introduction. The methods determinecellstocollapse and determinescore must be declared public (this requirement is to make it easier for us to test your code). The determinescore() method should just return the total number of rows that have been collapsed in the game so far, so this is pretty easy. In CS228Tetris, the main task of determinecellstocollapse() is to identify the locations of cells in all completed rows and return an ArrayList of Point objects containing those locations. The method returns an empty list if there are no completed rows. (Note the return type is List<Point>, since List is the interface implemented by ArrayList.) This part is also pretty easy. However, you ll also have to deal with magic blocks. The way that determinecellstocollapse() is invoked from AbstractBlockGame is the following. Whenever the current polyomino cannot fall any further, the step() method calls determinecellstocollapse(). If the returned list is nonempty, then the list is stored in the state variable cellstocollapse, the game goes into the COLLAPSING state (which allows the GUI to perform some animation of the cells to be collapsed). On the next call to step(), the method collapsecells of AbstractBlockGame is invoked to actually remove the cells from the grid and shift down the blocks above them. In certain games, collapsing some cells may create additional collapsible groups, possibly starting a chain reaction, so the logic of the COLLAPSING state is basically the following: while (game state is COLLAPSING ) { collapsecells(cellstocollapse); cellstocollapse = determinecellstocollapse(); if (cellstocollapse.size() == 0) { generate a new current polyomino change game state to NEW_POLYOMINO }

7 } Here is how it works in this game: if a completed row contains three or more magic blocks, then your game needs to go into gravity mode. What this means is that on the next call to determinecellstocollapse(), you should return a list of all the locations of empty cells that have one or more nonempty cells above them. (When the game then collapses those cells, it will have the effect of allowing the blocks above to independently fall to the bottom.) Then go back into normal mode, so that on the next call to determinecellstocollapse(), you will again just return the locations of cells in completed rows, if any. Remember that you do not have to implement the algorithm for collapsing cells, which is already implemented in AbstractBlockGame (the collapsecells() method). The PolyominoFactory class See the javadoc for the IPolyominoFactory interface. The purpose of this class is to make it easier for us to test your code. (You may wish to use the factory in your implementation of BasicGenerator, below, but that is optional.) Since you are defining the polyomino classes, we have no way to know what constructor or constructors you will define. Using a factory gives us a consistent way to create instances of your polyomino classes without knowing what the constructors are. The BasicGenerator class See the javadoc for the IPolyominoGenerator interface. You ll need to implement a BasicGenerator class implementing IPolyominoGenerator so that it returns one of the 6 concrete polyomino classes, chosen uniformly at random. In addition, each polyomino should include a magic block with probability 1/10. You must use the following initial positions for the polyominoes: LTetromino (7, -1) JTetromino (6, -1) ITriomino (6, -2) OTetromino (5, -1) TTetromino (6, 1) SZTetromino (5, -2) When a polyomino includes a magic block, it should be located in the first cell (according to the ordering defined previously in the section entitled The IPolyomino interface and the six concrete polyomino types ).

8 Getting started The user interface, and other source code, in the cs228hw1.zip archive is an Eclipse project that you can import and build. Run the main class edu.iastate.cs228.hw1.ui.gamemain. This will start up a SampleGame and you should see a simple animation which shows a Sampleomino (a simple two-cell polyomino) falling from top to bottom. You can put it into fast drop mode by pressing the down arrow key. A good place to start is to try to implement the missing methods of that will enable you to move the Sampleomino left and right. Then you could implement the determineblockstocollapse() method of SampleGame so that it finds completed rows. This would give you a rudimentary form of Tetris. Part 1 requires you to turn only your JUnit 4 test for the LTetromino. However, it is probably going to be easier to develop the test code if you have begun to implement the LTetromino class at the same time. Grading Your grade for Part 1 will mainly be determined by running your JUnit test on some correct and incorrect versions of LTetromino. The correct versions should pass your tests, and the incorrect versions should fail appropriately. A significant portion of your grade for Part 2 will be based on running our unit tests on your polyomino classes. A portion of your grade for Part 2 will be determined by how well you make use of inheritance to minimize code duplication in your polyomino classes. You will most likely need to create a polyomino superclass containing common code. Documentation and style Roughly 15% of the points will be for documentation and style. There is a brief set of guidelines to follow in the Course Specific section of the Web Links on our WebCT page (also linked in the syllabus). What to turn in For Part 1: Turn in a zip file containing your unit test LTetrominoTest ONLY, in the correct directory structure (root directory should be edu). For Part 2: Turn in a zip file containing all source code, including the distributed code. For detailed instructions on how to create a zip file and submit it via WebCT, see the Course Specific section of the Web Links (also linked in the syllabus). Late Penalties Assignments may be submitted up to 24 hours after the deadline with a 25% penalty (not counting

9 weekends/holidays). No credit will be given for assignments submitted after that time.

Our second exam is Thursday, November 10. Note that it will not be possible to get all the homework submissions graded before the exam.

Our second exam is Thursday, November 10. Note that it will not be possible to get all the homework submissions graded before the exam. Com S 227 Fall 2016 Assignment 3 300 points Due Date: Wednesday, November 2, 11:59 pm (midnight) Late deadline (25% penalty): Thursday, November 2, 11:59 pm General information This assignment is to be

More information

Our second exam is Monday, April 3. Note that it will not be possible to get all the homework submissions graded before the exam.

Our second exam is Monday, April 3. Note that it will not be possible to get all the homework submissions graded before the exam. Com S 227 Spring 2017 Assignment 3 300 points Due Date:, Wednesday, March 29 11:59 pm (midnight) Late deadline (25% penalty): Thursday, March 30, 11:59 pm General information This assignment is to be done

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

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

Com S 227 Spring 2018 Assignment points Due Date: Thursday, September 27, 11:59 pm (midnight) "Late" deadline: Friday, September 28, 11:59 pm

Com S 227 Spring 2018 Assignment points Due Date: Thursday, September 27, 11:59 pm (midnight) Late deadline: Friday, September 28, 11:59 pm Com S 227 Spring 2018 Assignment 2 200 points Due Date: Thursday, September 27, 11:59 pm (midnight) "Late" deadline: Friday, September 28, 11:59 pm (Remember that Exam 1 is MONDAY, October 1.) General

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

Com S 227 Spring 2018 Assignment points Due Date: Wednesday, March 28, 11:59 pm (midnight) "Late" deadline: Thursday, March 29, 11:59 pm

Com S 227 Spring 2018 Assignment points Due Date: Wednesday, March 28, 11:59 pm (midnight) Late deadline: Thursday, March 29, 11:59 pm Com S 227 Spring 2018 Assignment 3 300 points Due Date: Wednesday, March 28, 11:59 pm (midnight) "Late" deadline: Thursday, March 29, 11:59 pm General information This assignment is to be done on your

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

CMPSCI 187 / Spring 2015 Hangman

CMPSCI 187 / Spring 2015 Hangman CMPSCI 187 / Spring 2015 Hangman Due on February 12, 2015, 8:30 a.m. Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 CMPSCI 187 / Spring 2015 Hangman Contents Overview

More information

CSE115 Lab 4 Fall 2016

CSE115 Lab 4 Fall 2016 DUE DATES: Monday recitations: 9:00 PM on 10/09 Wednesday recitations: 9:00 PM on 10/11 Thursday recitations: 9:00 PM on 10/12 Friday recitations: 9:00 PM on 10/13 Saturday recitations: 9:00 PM on 10/14

More information

CS 2110 Summer 2011: Assignment 2 Boggle

CS 2110 Summer 2011: Assignment 2 Boggle CS 2110 Summer 2011: Assignment 2 Boggle Due July 12 at 5pm This assignment is to be done in pairs. Information about partners will be provided separately. 1 Playing Boggle 1 In this assignment, we continue

More information

CS 201 Advanced Object-Oriented Programming Lab 6 - Sudoku, Part 2 Due: March 10/11, 11:30 PM

CS 201 Advanced Object-Oriented Programming Lab 6 - Sudoku, Part 2 Due: March 10/11, 11:30 PM CS 201 Advanced Object-Oriented Programming Lab 6 - Sudoku, Part 2 Due: March 10/11, 11:30 PM Introduction to the Assignment In this lab, you will finish the program to allow a user to solve Sudoku puzzles.

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 2017 Miniassignment 1 50 points Due Date: Monday, October 16, 11:59 pm (midnight) Late deadline (25% penalty): Tuesday, October 17, 11:59 pm General information This assignment is to be

More information

CIS 121 Data Structures and Algorithms with Java Spring 2018

CIS 121 Data Structures and Algorithms with Java Spring 2018 CIS 121 Data Structures and Algorithms with Java Spring 2018 Homework 2 Thursday, January 18 Due Monday, January 29 by 11:59 PM 7 Required Problems (85 points), and Style and Tests (15 points) DO NOT modify

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

CS 134 Programming Exercise 9:

CS 134 Programming Exercise 9: CS 134 Programming Exercise 9: Nibbles Objective: To gain experience working with 2 dimensional arrays. The Problem Nibbles is a snake. Nibbles moves around a field, looking for food. Unfortunately, Nibbles

More information

CS 134 Test Program #2

CS 134 Test Program #2 CS 134 Test Program #2 Sokoban Objective: Build an interesting game using much of what we have learned so far. This second test program is a computer maze game called Sokoban. Sokoban is a challenging

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

Project 1 Computer Science 2334 Spring 2016 This project is individual work. Each student must complete this assignment independently.

Project 1 Computer Science 2334 Spring 2016 This project is individual work. Each student must complete this assignment independently. Project 1 Computer Science 2334 Spring 2016 This project is individual work. Each student must complete this assignment independently. User Request: Create a simple movie data system. Milestones: 1. Use

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

Practice Midterm 1. Problem Points Score TOTAL 50

Practice Midterm 1. Problem Points Score TOTAL 50 CS 120 Software Design I Spring 2019 Practice Midterm 1 University of Wisconsin - La Crosse February 25 NAME: Do not turn the page until instructed to do so. This booklet contains 10 pages including the

More information

Logistics. Final Exam on Friday at 3pm in CHEM 102

Logistics. Final Exam on Friday at 3pm in CHEM 102 Java Review Logistics Final Exam on Friday at 3pm in CHEM 102 What is a class? A class is primarily a description of objects, or instances, of that class A class contains one or more constructors to create

More information

Homework Assignment: Sudoku Board

Homework Assignment: Sudoku Board Homework Assignment: Sudoku Board Back Overview of the project This assignment is part of a larger project to create a Sudoku application. Assignment: Sudoku Board Assignment: Sudoku Model Assignment:

More information

ACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1

ACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1 ACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1 Due to CMS by Tuesday, February 14. Social networking has caused a return of the dot-com madness. You want in on the easy money, so you have decided to make

More information

15-110: Principles of Computing, Spring 2018

15-110: Principles of Computing, Spring 2018 15-110: Principles of Computing, Spring 2018 Problem Set 5 (PS5) Due: Friday, February 23 by 2:30PM via Gradescope Hand-in HANDIN INSTRUCTIONS Download a copy of this PDF file. You have two ways to fill

More information

Writeup for first project of CMSC 420: Data Structures Section 0102, Summer Theme: Threaded AVL Trees

Writeup for first project of CMSC 420: Data Structures Section 0102, Summer Theme: Threaded AVL Trees Writeup for first project of CMSC 420: Data Structures Section 0102, Summer 2017 Theme: Threaded AVL Trees Handout date: 06-01 On-time deadline: 06-09, 11:59pm Late deadline (30% penalty): 06-11, 11:59pm

More information

CMPSCI 187 / Spring 2015 Implementing Sets Using Linked Lists

CMPSCI 187 / Spring 2015 Implementing Sets Using Linked Lists CMPSCI 187 / Spring 2015 Implementing Sets Using Linked Lists Due on Tuesday February 24, 2015, 8:30 a.m. Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 CMPSCI

More information

To help you prepare for Problem 2, you are to write a simple Swing application which uses an anonymous inner class to control the application.

To help you prepare for Problem 2, you are to write a simple Swing application which uses an anonymous inner class to control the application. Problem Set 5 Due: 4:30PM, Friday March 22, 2002 Problem 1 Swing, Interfaces, and Inner Classes. [15%] To help you prepare for Problem 2, you are to write a simple Swing application which uses an anonymous

More information

INF 111 / CSE 121. Homework 3: Code Reading

INF 111 / CSE 121. Homework 3: Code Reading Homework 3: Code Reading Laboratory Date: Thursday, July 2, 2009 Take Home Due: Monday, July 2, 2009 Name : Student Number : Laboratory Time : Instructions for the Laboratory Objectives Open a project

More information

CMPSCI 187 / Spring 2015 Hanoi

CMPSCI 187 / Spring 2015 Hanoi Due on Thursday, March 12, 2015, 8:30 a.m. Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 Contents Overview 3 Learning Goals.................................................

More information

Turn in a printout of your code exercises stapled to your answers to the written exercises by 2:10 PM on Tuesday, January 18th.

Turn in a printout of your code exercises stapled to your answers to the written exercises by 2:10 PM on Tuesday, January 18th. 6.189 Homework 4 Readings How To Think Like A Computer Scientist: Wednesday: Make sure you ve finished Chapters 12-14 (all), & Chapter 16 (all); Thursday - get all readings finished! What to turn in Turn

More information

Programming Standards: You must conform to good programming/documentation standards. Some specifics:

Programming Standards: You must conform to good programming/documentation standards. Some specifics: CS3114 (Spring 2011) PROGRAMMING ASSIGNMENT #3 Due Thursday, April 7 @ 11:00 PM for 100 points Early bonus date: Wednesday, April 6 @ 11:00 PM for a 10 point bonus Initial Schedule due Thursday, March

More information

Programming Project 1

Programming Project 1 Programming Project 1 Handout 6 CSCI 134: Fall, 2016 Guidelines A programming project is a laboratory that you complete on your own, without the help of others. It is a form of take-home exam. You may

More information

Credit: The lecture slides are created based on previous lecture slides by Dan Zingaro.

Credit: The lecture slides are created based on previous lecture slides by Dan Zingaro. CSC148 2018 Here 1 Credit: The lecture slides are created based on previous lecture slides by Dan Zingaro. 2 Larry Zhang Office: DH-3042 Email: ylzhang@cs.toronto.edu 3 The teaching team Dan Zingaro: LEC0103

More information

CMPE/SE 135 Object-Oriented Analysis and Design

CMPE/SE 135 Object-Oriented Analysis and Design Course and Contact Information San José State University Department of Computer Engineering CMPE/SE 135 Object-Oriented Analysis and Design Instructor: Ron Mak Office Location: ENG 250 Email: ron.mak@sjsu.edu

More information

CS108, Stanford Handout #3. HW1 CodeCamp

CS108, Stanford Handout #3. HW1 CodeCamp CS108, Stanford Handout #3 Fall, 2008-09 Osvaldo Jiménez HW1 CodeCamp Thanks to Nick Parlante for much of this handout For this first homework, you will run through a series of small coding problems to

More information

CSC148 Summer 2018: Assignment 1

CSC148 Summer 2018: Assignment 1 CSC148 Summer 2018: Assignment 1 Due: Sunday, June 17th @ 11PM Overview In this assignment, you'll be implementing a Battle Game. This game consists of two types of characters which can perform various

More information

Project #1 Seam Carving

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

More information

CS201 - Assignment 3, Part 1 Due: Friday February 28, at the beginning of class

CS201 - Assignment 3, Part 1 Due: Friday February 28, at the beginning of class CS201 - Assignment 3, Part 1 Due: Friday February 28, at the beginning of class One of the keys to writing good code is testing your code. This assignment is going to introduce you and get you setup to

More information

CS 201 Advanced Object-Oriented Programming Lab 3, Asteroids Part 1 Due: February 17/18, 11:30 PM

CS 201 Advanced Object-Oriented Programming Lab 3, Asteroids Part 1 Due: February 17/18, 11:30 PM CS 201 Advanced Object-Oriented Programming Lab 3, Asteroids Part 1 Due: February 17/18, 11:30 PM Objectives to gain experience using inheritance Introduction to the Assignment This is the first of a 2-part

More information

Object Oriented Programming: In this course we began an introduction to programming from an object-oriented approach.

Object Oriented Programming: In this course we began an introduction to programming from an object-oriented approach. CMSC 131: Chapter 28 Final Review: What you learned this semester The Big Picture Object Oriented Programming: In this course we began an introduction to programming from an object-oriented approach. Java

More information

CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 11:00 PM for 100 points Due Monday, October 11:00 PM for 10 point bonus

CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 11:00 PM for 100 points Due Monday, October 11:00 PM for 10 point bonus CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 15 @ 11:00 PM for 100 points Due Monday, October 14 @ 11:00 PM for 10 point bonus Updated: 10/10/2013 Assignment: This project continues

More information

CSE 142, Autumn 2018 Programming Assignment #9: Critters (20 points) Due Tuesday, December 4th, 9:00 PM

CSE 142, Autumn 2018 Programming Assignment #9: Critters (20 points) Due Tuesday, December 4th, 9:00 PM CSE 142, Autumn 2018 Programming Assignment #9: Critters (20 points) Due Tuesday, December 4th, 9:00 PM This assignment focuses on classes and objects. Turn in Ant.java, Bird.java, Hippo.java, Vulture.java,

More information

CS 215 Software Design Homework 3 Due: February 28, 11:30 PM

CS 215 Software Design Homework 3 Due: February 28, 11:30 PM CS 215 Software Design Homework 3 Due: February 28, 11:30 PM Objectives Specifying and checking class invariants Writing an abstract class Writing an immutable class Background Polynomials are a common

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

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

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

Programming Exercise

Programming Exercise Programming Exercise Nibbles Objective: To gain experience working with 2 dimensional arrays. The Problem Nibbles is a snake. Nibbles moves around a field, looking for food. Unfortunately, Nibbles is not

More information

Global Gomoku Lab 4 in D0010E

Global Gomoku Lab 4 in D0010E Luleå University of Technology February 20, 2012 Computer Science Håkan Jonsson Global Gomoku Lab 4 in D0010E 1 Introduction Modern forms of communication are more and more carried out over the Internet,

More information

Comp-361 : Game Programming Lecture 5

Comp-361 : Game Programming Lecture 5 Game Programming Comp-361 : Game Programming Lecture 5 Alexandre Denault Original notes by Jörg Kienzle and Hans Vangheluwe Computer Science McGill University Winter 2008 Time Slot Monday 9h45 10h00 10h15

More information

JAVA MOCK TEST JAVA MOCK TEST II

JAVA MOCK TEST JAVA MOCK TEST II http://www.tutorialspoint.com JAVA MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Java Framework. You can download these sample mock tests at your

More information

CSE 142 Su 02 Homework 4

CSE 142 Su 02 Homework 4 CSE 142 - Su 02 Homework 4 Assigned: Wednesday, July 17 Due: Wednesday, July 24, BEFORE MIDNIGHT ** General Comments about the Homework ** All homework is turned in electronically. Go to the class web

More information

CMSC 201 Spring 2018 Project 2 Battleship

CMSC 201 Spring 2018 Project 2 Battleship CMSC 201 Spring 2018 Project 2 Battleship Assignment: Project 2 Battleship Due Date: Design Document: Friday, April 13th, 2018 by 8:59:59 PM Project: Friday, April 20th, 2018 by 8:59:59 PM Value: 80 points

More information

A Step-by-step guide to creating a Professional PowerPoint Presentation

A Step-by-step guide to creating a Professional PowerPoint Presentation Quick introduction to Microsoft PowerPoint A Step-by-step guide to creating a Professional PowerPoint Presentation Created by Cruse Control creative services Tel +44 (0) 1923 842 295 training@crusecontrol.com

More information

Spring 2018 El Camino College E. Ambrosio. Course Syllabus

Spring 2018 El Camino College E. Ambrosio. Course Syllabus Course Syllabus Division: Mathematical Sciences Course Title: Computer Programming in Java Course #/Sections: CS 3/0127, 0128 Credit Hours: 4 Course Time/Room: Lecture: TTh 6:25 7:50 P.M./MBA 213 Lab:

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

AP Computer Science A Syllabus

AP Computer Science A Syllabus This syllabus #1829769v1 was reviewed and approved by the College Board in Nov, 2016.. AP Computer Science A Syllabus Last updated November, 2016 Course Overview This AP Computer Science A class uses the

More information

Project 1 - Battleship Game

Project 1 - Battleship Game Project 1 - Battleship Game Minimal Submission Due: Friday, December 22 th, 2006 Revision History Final Project Due: Sunday, January 21 th, 2007 Dec 7th, 2006, v1.0: Initial revision for faculty review.

More information

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

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

More information

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently.

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently. Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently. User Request: Create a simple magazine data system. Milestones:

More information

Blocky: A Game of Falling Blocks

Blocky: A Game of Falling Blocks ECE220: Computer Systems and Programming Machine Problem 6 Spring 2018 Honors Section due: Thursday 1 March, 11:59:59 p.m. Blocky: A Game of Falling Blocks Your task this week is to implement a game of

More information

Assignment3 CS206 Intro to Data Structures Fall Part 1 (50 pts) due: October 13, :59pm Part 2 (150 pts) due: October 20, :59pm

Assignment3 CS206 Intro to Data Structures Fall Part 1 (50 pts) due: October 13, :59pm Part 2 (150 pts) due: October 20, :59pm Part 1 (50 pts) due: October 13, 2013 11:59pm Part 2 (150 pts) due: October 20, 2013 11:59pm Important Notes This assignment is to be done on your own. If you need help, see the instructor or TA. Please

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

CPSC 217 Assignment 3

CPSC 217 Assignment 3 CPSC 217 Assignment 3 Due: Monday November 23, 2015 at 12:00 noon Weight: 7% Sample Solution Length: 135 lines, including some comments (not including the provided code) Individual Work: All assignments

More information

Develop and use a proper design. (See, in particular, Milestone 4, above.) 15 points Use proper documentation and formatting.

Develop and use a proper design. (See, in particular, Milestone 4, above.) 15 points Use proper documentation and formatting. Project 3 Computer Science 2334 Spring 2016 This project is group work. Group composition will be determined later this week. Each student should complete and submit the draft design individually. User

More information

CSSE2002/7023 The University of Queensland

CSSE2002/7023 The University of Queensland CSSE2002 / CSSE7023 Semester 1, 2016 Assignment 1 Goal: The goal of this assignment is to gain practical experience with data abstraction, unit testing and using the Java class libraries (the Java 8 SE

More information

Cmpt 135 Assignment 2: Solutions and Marking Rubric Feb 22 nd 2016 Due: Mar 4th 11:59pm

Cmpt 135 Assignment 2: Solutions and Marking Rubric Feb 22 nd 2016 Due: Mar 4th 11:59pm Assignment 2 Solutions This document contains solutions to assignment 2. It is also the Marking Rubric for Assignment 2 used by the TA as a guideline. The TA also uses his own judgment and discretion during

More information

ASSIGNMENT 5 Objects, Files, and a Music Player

ASSIGNMENT 5 Objects, Files, and a Music Player ASSIGNMENT 5 Objects, Files, and a Music Player COMP-202A, Fall 2009, All Sections Due: Thursday, December 3, 2009 (23:55) You MUST do this assignment individually and, unless otherwise specified, you

More information

You Can Make a Difference! Due April 11/12 (Implementation plans due in class on 4/9)

You Can Make a Difference! Due April 11/12 (Implementation plans due in class on 4/9) You Can Make a Difference! Due April 11/12 (Implementation plans due in class on 4/9) In last week s lab, we introduced some of the basic mechanisms used to manipulate images in Java programs. Now, we

More information

CS 210 Fundamentals of Programming I Spring 2015 Programming Assignment 4

CS 210 Fundamentals of Programming I Spring 2015 Programming Assignment 4 CS 210 Fundamentals of Programming I Spring 2015 Programming Assignment 4 20 points Out: February 18/19, 2015 Due: February 25/26, 2015 Reminder: This is a programming assignment, and work on this assignment

More information

Transformation, tessellation and symmetry line symmetry

Transformation, tessellation and symmetry line symmetry Transformation, tessellation and symmetry line symmetry Reflective or line symmetry describes mirror image, when one half of a shape or picture matches the other exactly. The middle line that divides the

More information

CS2110 Assignment 3 Inheritance and Trees, Summer 2008

CS2110 Assignment 3 Inheritance and Trees, Summer 2008 CS2110 Assignment 3 Inheritance and Trees, Summer 2008 Due Sunday July 13, 2008, 6:00PM 0 Introduction 0.1 Goals This assignment will help you get comfortable with basic tree operations and algorithms.

More information

This is a structured tutorial demonstrating the features of the GEdit system. The tutorial guides the designer through three structured examples.

This is a structured tutorial demonstrating the features of the GEdit system. The tutorial guides the designer through three structured examples. Tutorial on Gedit This is a structured tutorial demonstrating the features of the GEdit system. The tutorial guides the designer through three structured examples. Background GEdit is a program that allows

More information

Learning Objective. Project Objective

Learning Objective. Project Objective Table of Contents 15-440: Project 1 Remote File Storage and Access Kit (File Stack) Using Sockets and RMI Design Report Due Date: 14 Sep 2011 Final Due Date: 3 Oct 2011 Learning Objective...1 Project Objective...1

More information

Lab 4: Super Sudoku Solver CSCI 2101 Fall 2017

Lab 4: Super Sudoku Solver CSCI 2101 Fall 2017 Due: Wednesday, October 18, 11:59 pm Collaboration Policy: Level 1 Group Policy: Pair-Optional Lab 4: Super Sudoku Solver CSCI 2101 Fall 2017 In this week s lab, you will write a program that can solve

More information

be able to read, understand, and modify a program written by someone else utilize the Java Swing classes to implement a GUI

be able to read, understand, and modify a program written by someone else utilize the Java Swing classes to implement a GUI Homework 5, CS 2119 B-term 2015 Completing the GUI for a Student Database Due: Thursday, December 10 at 5pm Outcomes After successfully completing this assignment, you will be able to read, understand,

More information

Solutions to Quiz 1 (March 14, 2016)

Solutions to Quiz 1 (March 14, 2016) MIT 6.005: Software Construction Max Goldman revised Wednesday 16 th March, 2016, 14:08 Solutions to Quiz 1 (March 14, 2016) Problem 1 (Multiple Choice) (20 points). (a) Which of the following must be

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

CS 201 Advanced Object-Oriented Programming Lab 4 - Asteroids, Part 2 Due: February 24/25, 11:30 PM

CS 201 Advanced Object-Oriented Programming Lab 4 - Asteroids, Part 2 Due: February 24/25, 11:30 PM CS 201 Advanced Object-Oriented Programming Lab 4 - Asteroids, Part 2 Due: February 24/25, 11:30 PM Introduction to the Assignment In this lab, you will complete the Asteroids program that you started

More information

9/19/2018 Programming Data Structures. Polymorphism And Abstract

9/19/2018 Programming Data Structures. Polymorphism And Abstract 9/19/2018 Programming Data Structures Polymorphism And Abstract 1 In-class assignment: deadline noon!! 2 Overview: 4 main concepts in Object-Oriented Encapsulation in Java is a mechanism of wrapping the

More information

Critters. Critter #2 Attack.ROAR Attack.POUNCE Attack.SCRATCH. Critter #1

Critters. Critter #2 Attack.ROAR Attack.POUNCE Attack.SCRATCH. Critter #1 Critters This assignment was co-created by Stuart Reges and Marty Stepp. This program focuses on classes, objects, and inheritance. You will write the following files: Ant.java, Bird.java, Crab.java, FireAnt.java,

More information

Lab Exercise 6: Abstract Classes and Interfaces CS 2334

Lab Exercise 6: Abstract Classes and Interfaces CS 2334 Lab Exercise 6: Abstract Classes and Interfaces CS 2334 September 29, 2016 Introduction In this lab, you will experiment with using inheritance in Java through the use of abstract classes and interfaces.

More information

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 2: Review of Object Orientation 2.1 What is Object Orientation? Procedural paradigm: Software is organized

More information

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created.

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created. + Inheritance + Inheritance Classes that we design in Java can be used to model some concept in our program. For example: Pokemon a = new Pokemon(); Pokemon b = new Pokemon() Sometimes we need to create

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

Homeschool Programming, Inc.

Homeschool Programming, Inc. Online Course Overview Course Title: TeenCoder: Java Programming TeenCoder: Java Programming Online Course Syllabus and Planner Updated November, 2015 Online ISBN: 978-0-9887070-2-3, published 2015 by

More information

Introduction to Computers and Engineering Problem Solving Spring 2012 Problem Set 5: MBTA routes Due: 12 noon, Friday, March 23

Introduction to Computers and Engineering Problem Solving Spring 2012 Problem Set 5: MBTA routes Due: 12 noon, Friday, March 23 Introduction to Computers and Engineering Problem Solving Spring 2012 Problem Set 5: MBTA routes Due: 12 noon, Friday, March 23 Problem statement a. Overview The Massachusetts Bay Transportation Authority

More information

Quiz 1 (March 14, 2016)

Quiz 1 (March 14, 2016) MIT 6.005: Software Construction Max Goldman revised Sunday 13 th March, 2016, 15:30 Quiz 1 (March 14, 2016) Your name: Your Athena username: You have 50 minutes to complete this quiz. It contains 12 pages

More information

Introduction to Computation and Problem Solving

Introduction to Computation and Problem Solving Class 13: Inheritance and Interfaces Introduction to Computation and Problem Solving Prof. Steven R. Lerman and Dr. V. Judson Harward 2 More on Abstract Classes Classes can be very general at the top of

More information

Object-Oriented Software Engineering. Chapter 2: Review of Object Orientation

Object-Oriented Software Engineering. Chapter 2: Review of Object Orientation Object-Oriented Software Engineering Chapter 2: Review of Object Orientation 2.1 What is Object Orientation? Procedural paradigm: Software is organized around the notion of procedures Procedural abstraction

More information

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION Course Title: Java Technologies Grades: 10-12 Prepared by: Rob Case Course Unit: What is Java? Learn about the history of Java. Learn about compilation & Syntax. Discuss the principles of Java. Discuss

More information

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018 San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018 Course and Contact Information Instructor: Suneuy Kim Office

More information

Inheritance and Polymorphism

Inheritance and Polymorphism Object Oriented Programming Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. Al-Azhar University Website: eaymanelshenawy.wordpress.com Email : eaymanelshenawy@azhar.edu.eg

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

Electronic Portfolios in the Classroom

Electronic Portfolios in the Classroom Electronic Portfolios in the Classroom What are portfolios? Electronic Portfolios are a creative means of organizing, summarizing, and sharing artifacts, information, and ideas about teaching and/or learning,

More information

CMPSC 111 Introduction to Computer Science I Fall 2016 Lab 8 Assigned: October 26, 2016 Due: November 2, 2016 by 2:30pm

CMPSC 111 Introduction to Computer Science I Fall 2016 Lab 8 Assigned: October 26, 2016 Due: November 2, 2016 by 2:30pm 1 CMPSC 111 Introduction to Computer Science I Fall 2016 Lab 8 Assigned: October 26, 2016 Due: November 2, 2016 by 2:30pm Objectives To enhance your experience with designing and implementing your own

More information

CS201 - Assignment 7 Due: Wednesday April 16, at the beginning of class

CS201 - Assignment 7 Due: Wednesday April 16, at the beginning of class CS201 - Assignment 7 Due: Wednesday April 16, at the beginning of class http://xkcd.com/205/ For this assignment, we re going to be playing a bit with stacks and queues. Make sure you read through the

More information

Hands on Assignment 1

Hands on Assignment 1 Hands on Assignment 1 CSci 2021-10, Fall 2018. Released Sept 10, 2018. Due Sept 24, 2018 at 11:55 PM Introduction Your task for this assignment is to build a command-line spell-checking program. You may

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

CSE115 / CSE503 Introduction to Computer Science I. Dr. Carl Alphonce 343 Davis Hall Office hours:

CSE115 / CSE503 Introduction to Computer Science I. Dr. Carl Alphonce 343 Davis Hall Office hours: CSE115 / CSE503 Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall alphonce@buffalo.edu Office hours: Thursday 12:00 PM 2:00 PM Friday 8:30 AM 10:30 AM OR request appointment via e-mail

More information