Lab 3 Due March 18 at midnight

Size: px
Start display at page:

Download "Lab 3 Due March 18 at midnight"

Transcription

1 Lab 3 Due March 18 at midnight For this lab, if you choose, you may work with a partner. You may also choose to work alone. If you decide to work with a partner, you must choose a partner who has the same TA you have, and you must put both your name and your partner s name on the lab. No more than 2 people per group. Note that you must BOTH WORK ON ALL THE PROBLEMS. Equally, My partner bailed is not an excuse for not turning in the lab. If you choose to work with a partner, only one of you needs to turn in the lab, but both names must be on the lab (of course). Part 1: 1. (8 pts) Create a class for a watch. It should have private hour, minute, and seconds as fields. It should have 4 constructors: one that takes no fields and sets the time to 12:00:00, one that takes only the hour field as an input and sets the minutes and seconds to 0, one that takes the hour and the minute fields as input parameters and sets the seconds to 0, and then one that sets all 3 fields. There should be a Set method that sets the hour, the minute, and the seconds field. There should be a Get method that returns a string that represents the current time. And finally, you should create a main class that has a main method in it and creates a watch object. Test your 4 constructors. Test your get and set methods. 2. (14 pts) I have a nike app. It keeps track of the miles I run daily, the seven-day average (starting at Sunday each week), my average mph for each run, and my seven-day average for mph. It also tells me whether I ve run farther this week than last week (so it keeps track of how many miles I ran last week) and whether I ran, on average, faster this week than last week (again, so it keeps track of how fast I ran last week (and, of course, it has my name). a. Write a class for a nike app. Include the proper fields for each of the above properties. The fields should be private. b. Write 3 constructors: one that sets all fields to 0 (or arrays of 0); one that sets the miles for the week to different values (e.g., {7.2,5.9,6.1,6.0,5.4,8.3,0.0) and the rest of the fields to zero; and one that sets the miles for the week and the array of mph for week and the rest of the fields to zero. c. Now write some methods: i. Get functions for each of the fields (also known as accessors ). Each of these functions should return a field s value (e.g., the getlastweeksmileage should return the field holding last week s average mileage). For the array fields, return one string printing out each day of the week s value) ii. One that resets at the end of the week, calculating the average number of miles run this week and setting the past week s average to that value, then zeroing out this week s average miles, and calculating the average mph and setting last week s average mph to that, then zeroing out the daily mph. iii. A method that looks at how far I ve run so far this week and tells me whether I ve run farther this week than last week

2 iv. A method that looks at how fast I ve run on average this week and tells me whether I m running faster this week or last week. v. A method that allows you to input your mileage for a particular day (this method will take one input parameter the day of the week, in the form of a number, with 0 = Sunday, 1 = Monday, etc. For this function you will want to be able to input data. To do this, use a dialog box. First at the very top of the class file, import javax.swing.joptionpane; in the method, create a string variable that will hold the input from the dialog box: String svar = JOptionPane.showInputDialog( Enter your mileage today ); And finally, you ll have to convert the svar to a double: double mlg = Double.parseDouble(svar); vi. A method that allows you to input your average mph for a particular day (this method will be very similar to the above method). d. Now create a main class (a separate class with a main method in it). In it test the constructors by creating different nike app objects with different constructors. Test the different methods (you ll have to test the methods that allow you to reset and allow you to enter data before you can test the methods that compare this week to last week). 3. (10 pts) Create a class for a racer. The racer class should have as fields a first name, a last name, an average race time, and the brand of shoes they re wearing. The class should also have a static field for the number of racers created. It should also have a static field for the number of racers who wear vibram shoes. Create constructors that initialize the fields and update the static fields. Now write a main class that creates a bunch of racer objects. When you ve created a bunch of racer objects, print out the ratio of racers who wear vibrams. 4. (18 pts) TicTacToe: Create a class for the game of tictactoe. a. The class will need a board field, which should be an array of 3 arrays of 3 chars (a matrix), originally set to all B s (for blank). (You can also initialize the values to be, or the space character). b. The class needs a method (HasWon) that returns a character (either x, o, or b (or ), or n ). The method checks to see whether anyone has won or not, and, if someone has won, returns the character of the winner. If the board is filled (no blanks) but no one has won, it should return the n character. If no one has won and the game is still going on, it should return either the b or the character. c. The class needs a method that prints out the board (and returns nothing, i.e., void ). (System.out.print() prints something, without going to the next line. \t prints a tab). d. The class needs a method (ComputerTurn) that uses a loop to continually generate a random number between 0 and 2, and then a second number between 0 and 2, and, if the board is blank at that place, places an o on the board in that place. It then calls the HasWon method to check to see if someone has won, and, if so, returns the character returned by the HasWon method. Note: to generate a random number, include as the top line:

3 import java.util.random;, inside your method, create a new random object (you do this only once in the method): Random rand = new Random(); And now, each time you want a new random integer between 0 and, say, 100, you d do the following: int randx = rand.nextint(100); and this will return a random number between 0 and 100 (not including 100) and place it in your variable randx. e. The class needs a method (YourTurn) that uses the dialog box to ask the user to enter their row, and then uses the dialog box to ask the user to enter their column. If the space is blank (has a b or a in it), it then enters an x into the row and column the user entered (if the space isn t blank, nothing is entered in the space). It calls the HasWon class to check if anyone has won and, if so, returns the character returned by the HasWon method. f. The class needs a method called PlayGame. It should return a string saying either who won or that no one won. The method will loop until either someone has won, or there is no possible winner (remember, a loop loops while something is true!). The loop should print out the board. Each time the loop loops it should either call the ComputerTurn or the YourTurn method (a Boolean value would be nice to keep track of this). g. Finally, create a main class that creates a tictactoe object. Call the PlayGame method and play a game of tictactoe. Extra Credit (5-10 pts): modify the ComputerTurn method so that the computer makes more intelligent choices. Part 2: OCR (50 pts) We humans are quite good at generalizing. We can look at text that s on a page that is splattered with mud (or, more likely, coffee), and we can most likely read the text. We can read text that has been ripped, crumpled, faded, and even worn off the page. We re that good. Computers, however, struggle with the problem of generalizing. And yet it is necessary to be able to take a page with text on it and to scan it in and convert it into recognized characters and words. Think of all the medical records that are currently sitting in files in medical offices. What if you need to know whether your mom was ever vaccinated against whooping cough? What if the CDC wants to determine if there s an outbreak of a particular syndrome or type of cancer in a particular region of the country? Equally, many law offices need to scan in old cases and conclusions (clearly I m not a lawyer I m not using the correct terminology) so that when researching current cases they can refer to previous conclusions to support their case. I ve dealt extensively with the problem of scanning in documents and converting them into a form that can be used in a word processor (and hence read by a screen reader) when dealing with students who are blind or just nonvisual readers. These students regularly get handouts from professors

4 who ve had an article they ve been Xeroxing since the 80 s. Without the ability to scan in the paper and then convert it to a form that can be read by a screenreader, the handout is the equivalent of a blank paper to these students. The problem of taking text on a physical page and digitizing it and converting it into characters recognized by the computer is known as OCR Optical Character Recognition. It usually consists of two parts: Taking a page and scanning it in to the computer (i.e., digitizing the page); and then taking the scanned in image and locating characters within the scanned in page. When the page is first scanned into the computer, it is usually a bitmapped image of the page just numbers representing the amount of color at every dot on the page. At this point, the computer has no idea what characters may be on the page. OCR involves looking at the dots of color within the scanned image and trying to find patterns of color, and then relate those patterns to patterns of images. Initially, OCR was done using individual files, with each file holding a pattern for a particular character in a particular font. While this can clearly get out of hand quickly (think of the number of fonts you have on your computer alone, and then throw in individual handwriting), we still use this method for certain problems in which we know the font that will be used. More frequently today we use a more sophisticated system of looking for characteristic patterns that represent characters. For instance, a capital letter A would be represented by 3 patterns a forward slant, a backwards slant, and a horizontal line occurring between the top and bottom of the forward slant and backward slant. Your problem: The post office only has to identify zip codes. Thus their problem is limited to 10 characters 0 through 9. For simplicity s sake, that s what we ll work on. In addition, we ll assume that every character is in the same font. Thus we have files representing the characters 0 through 9 (named zero.txt, one.txt, two.txt, etc.). These will be the files that will be used to identify characters in the various image files (You can download each of these number files from my web site. Store them in your Lab3 folder (parallel to the src folder)). The general idea: Both the character files and the image files will be read into matrices (arrays of arrays). The image file will be cleaned (converted so that each entry in the matrix will either be considered black (represented by 1) or white (represented by 0). Once the image file is cleaned, each entry in the character file will be compared to each entry in the image file. If the two entries match, the matching score will increase. If they don t, the score will either drop or stay the same. Thus an overall matching score will be determined for the image file and the character file. The image file will be compared to all 10 character files. The image will be determined to be the character whose file it best matches. Note that the image file will be noisy, meaning there will be certain dots that will be considered to be black (1) when they are just dirt specs or extra ink, or even just scanned in incorrectly. Equally some dots that should have ink may be considered white (0), possibly because of folds in the paper or overxeroxing, etc. We re doing a best match. Specifically:

5 I am giving you a class called NumFiles that will read in each of the character files into a private field of int[][] (i.e., a matrix of integers). The field will be named after the number it represents (e.g., zero, one, two, ). Each matrix is a 13x13 matrix of integers representing the black/white (0/1) pattern of a particular character. The fields are private, so you must access them using the accessor called getmatrix, which takes as a parameter a String that holds the name of the number (again, zero, one, two, etc.). Your job is to create an image class (completing the outline, below), and then to create a main class that creates an object from the image class and calls its FindBestMatch method to determine which number best matches the image file. Here is an outline of the image class: import java.io.file; import java.io.filenotfoundexception; import java.util.scanner; import javax.swing.joptionpane; public class ImgClass { /* has a field for a NumFiles object, that will contain all the matrices for each number. This field s fields will be used for comparison to determine which number best matches the pattern in the image file. /*has a field for the image matrix, read in using the ReadMatrix() method, given below, that reads in the file of doubles containing the image of the number double[][] imgmatrix = ReadMatrix(); /* has a field that is a matrix of integers the same size as the imgmatrix. It will hold the black/white version of the image matrix. It is created by the method cleanup, which takes each value (double) in the imgmatrix and translates it to a 1 in the new matrix if the value is above.5, and to a 0 if the value is below.5.(you can read more about the cleanup method under its method description, below). public double[][] ReadMatrix() { /*This method reads in an image file of doubles, representing a character. You must enter the name of the file to be read in, and the file must be in your Lab3 folder (parallel to the src folder). //This method returns an array of doubles, representing the image file. // Don t mess with this method. It works. Don t argue with me. // Honestly, it works. String filename = JOptionPane.showInputDialog("Enter The file to be read"); File fl = new File(filename); double matrix[][] = new double[0][0]; try { Scanner fn = new Scanner(fl); int row = 0; while (fn.hasnext()) { row ++;

6 fn.nextline(); fn.close(); matrix = new double[row][]; Scanner f2 = new Scanner(fl); row = 0; while (f2.hasnext()) { String line = f2.nextline(); System.out.println(line); String[] numarr = line.split(" "); int x = numarr.length; double[] arr = new double[x]; matrix[row]= arr; for (int i = 0; i<numarr.length;i++){ matrix[row][i] = Double.parseDouble(numarr[i]); row++; f2.close(); catch (FileNotFoundException e) { System.out.println("Error opening file. Please make sure that you have your text file in the same folder as the NumFiles.class"); System.exit(0); return matrix; public int[][] cleanup() { /* this method cleans up the image matrix of doubles, created from the image file. It creates and returns a brand new matrix of integers, the same size as the image matrix of doubles. It takes each value in the image matrix and translates it to a 1 in the new matrix if the value is greater than.5, and translates it to a 0 otherwise. /*So, for instance, if the image matrix looks like this: { { 0.428, 0.671, 0.323, { 0.682, 0.031, 0.273, { 0.423, 0.888, 0.782, The new matrix will look like this: { { 0, 1, 0, 0 { 1, 0, 0, 1 { 0, 1, 1, 0 public String FindBestMatch() { /*This method uses the method comparematrices to compare the imgmatrix to each of the num matrices in the NumFiles object. It keeps track of scores returned from comparematrices. The NumFile matrix with the best comparematrices score is considered to be the most likely character, and a string representing that number is returned. So, for instance, if the comparison between the imgmatrix and the NumFiles object s three field returns the highest score, the string three is the best match is returned.

7 /* Note that this method would ve been much easier to write if I d made one field in my NumFiles class, and that one field was an array of matrices. public double comparematrices(int[][] num) { /*This is the challenging method, and the heart of the OCR algorithm /* This method takes as input the img matrix and the num matrix. It loops through every possible place in which the num matrix could occur within the img matrix and gets a score of how well the two matrices match up. Note that the image matrix can be any dimensions, although we can assume the dimensions are larger than the num matrix. So, for instance, if the image matrix is 5 x 9 and the num matrix is 4 x 4, you d have to look at each possible comparison:

8

9 With the 4x4 matrix representing the character. /* This will require loops inside of loops. The matching score for each possible matching matrix should be calculated as follows: If both the img matrix and the num matrix are 1, the score increases by 1.0. If the num matrix is 1 and the image matrix is 0, the score goes down by.25. If both the img matrix and the num matrix are 0, the score goes up by.25. And if the num matrix is 0 but the image matrix is 1, the score stays the same. You must calculate the matching score for each possible matching matrix within the imgmatrix, and return the best score of those scores. Note that if you wish to create other methods that this method uses, that is fine with me.

Lab 4 Due April 18 th

Lab 4 Due April 18 th Lab 4 Due April 18 th (100 pts) You may work with a partner if you want. Turn in one version with 2 names on it. Do not forget your partner s name. Or work alone. Your choice. Problem 1 (10 pts): Create

More information

CISC 181 Lab 2 (100 pts) Due: March 4 at midnight (This is a two-week lab)

CISC 181 Lab 2 (100 pts) Due: March 4 at midnight (This is a two-week lab) CISC 181 Lab 2 (100 pts) Due: March 4 at midnight (This is a two-week lab) This lab should be done individually. Labs are to be turned in via Sakai by midnight on Tuesday, March 4 (the midnight between

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

CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab)

CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab) CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab) This lab may be done individually or with a partner. Working with a partner DOES NOT mean, you do the evens, and I ll do the odds.

More information

Lines of Symmetry. Grade 3. Amy Hahn. Education 334: MW 8 9:20 a.m.

Lines of Symmetry. Grade 3. Amy Hahn. Education 334: MW 8 9:20 a.m. Lines of Symmetry Grade 3 Amy Hahn Education 334: MW 8 9:20 a.m. GRADE 3 V. SPATIAL SENSE, GEOMETRY AND MEASUREMENT A. Spatial Sense Understand the concept of reflection symmetry as applied to geometric

More information

CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts)

CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts) CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts) Problem 0: Install Eclipse + CDT (or, as an alternative, Netbeans). Follow the instructions on my web site.

More information

CISC220 Lab 2: Due Wed, Sep 26 at Midnight (110 pts)

CISC220 Lab 2: Due Wed, Sep 26 at Midnight (110 pts) CISC220 Lab 2: Due Wed, Sep 26 at Midnight (110 pts) For this lab you may work with a partner, or you may choose to work alone. If you choose to work with a partner, you are still responsible for the lab

More information

Lab 2. CSE 3, Summer 2010 In this lab you will learn about file structures and advanced features of Microsoft Word.

Lab 2. CSE 3, Summer 2010 In this lab you will learn about file structures and advanced features of Microsoft Word. Lab 2 CSE 3, Summer 2010 In this lab you will learn about file structures and advanced features of Microsoft Word. A. Create a basic File Structure Let s start by opening up the My Documents folder on

More information

Programming Lab 1 (JS Hwk 3) Due Thursday, April 28

Programming Lab 1 (JS Hwk 3) Due Thursday, April 28 Programming Lab 1 (JS Hwk 3) Due Thursday, April 28 Lab You may work with partners for these problems. Make sure you put BOTH names on the problems. Create a folder named JSLab3, and place all of the web

More information

Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM

Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM 1 Instructions Labs may be done in groups of 2 or 3 (i.e., not alone). You may use any programming language you wish but MATLAB is highly suggested.

More information

Lesson 10: Quiz #1 and Getting User Input (W03D2)

Lesson 10: Quiz #1 and Getting User Input (W03D2) Lesson 10: Quiz #1 and Getting User Input (W03D2) Balboa High School Michael Ferraro September 1, 2015 1 / 13 Do Now: Prep GitHub Repo for PS #1 You ll need to submit the 5.2 solution on the paper form

More information

CS 134 Programming Exercise 2:

CS 134 Programming Exercise 2: CS 134 Programming Exercise 2: Dirty Laundry Objective: To gain experience using conditionals. The Scenario. One thing some students have to figure out for the first time when they come to college is how

More information

Part 1. Summary of For Loops and While Loops

Part 1. Summary of For Loops and While Loops NAME EET 2259 Lab 5 Loops OBJECTIVES -Understand when to use a For Loop and when to use a While Loop. -Write LabVIEW programs using each kind of loop. -Write LabVIEW programs with one loop inside another.

More information

Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T

Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T Touring_the_Mac_Session-4_Feb-22-2011 1 To store your document for later retrieval, you must save an electronic file in your computer.

More information

WORD PROCESSING FOR SALE. By Shel Silverstein

WORD PROCESSING FOR SALE. By Shel Silverstein ASSIGNMENT #1 ~ Scavenger Hunt 2. Your job is to retrieve several documents. Read the poem, and then write down on the worksheet the clue word you find, then you will close and exit the file. 3. Each clue

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

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

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

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

CSCI 2101 Java Style Guide

CSCI 2101 Java Style Guide CSCI 2101 Java Style Guide Fall 2017 This document describes the required style guidelines for writing Java code in CSCI 2101. Guidelines are provided for four areas of style: identifiers, indentation,

More information

JS Lab 1: (Due Thurs, April 27)

JS Lab 1: (Due Thurs, April 27) JS Lab 1: (Due Thurs, April 27) For this lab, you may work with a partner, or you may work alone. If you choose a partner, this will be your partner for the final project. If you choose to do it with a

More information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information

Lab 4: Strings/Loops Due Apr 22 at midnight

Lab 4: Strings/Loops Due Apr 22 at midnight Lab 4: Strings/Loops Due Apr 22 at midnight For this lab, you must work with a partner. All functions should be commented appropriately. If there are random numbers, the function must still be commen ted

More information

CSC 101 Spring 2010 Lab #8 Report Gradesheet

CSC 101 Spring 2010 Lab #8 Report Gradesheet CSC 101 Spring 2010 Lab #8 Report Gradesheet Name WFU Username Lab Section: A B C D Partner s Name (if you had one): Topic Points Notes Pre-lab questions 20 total - 5 at 4 points each Lab report questions

More information

ENGR 40M Project 3c: Coding the raindrop pattern

ENGR 40M Project 3c: Coding the raindrop pattern ENGR 40M Project 3c: Coding the raindrop pattern For due dates, see the overview handout The raindrop pattern works like this: Once per time period (say, 150 ms), (a) move the pattern one plane down: the

More information

Hey there, I m (name) and today I m gonna talk to you about rate of change and slope.

Hey there, I m (name) and today I m gonna talk to you about rate of change and slope. Rate and Change of Slope A1711 Activity Introduction Hey there, I m (name) and today I m gonna talk to you about rate of change and slope. Slope is the steepness of a line and is represented by the letter

More information

CS61BL. Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling

CS61BL. Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling CS61BL Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling About me Name: Edwin Liao Email: edliao@berkeley.edu Office hours: Thursday 3pm - 5pm Friday 11am - 1pm 611 Soda Or by

More information

Two days ago President Obama released his long form birth certificate. The file is available at:

Two days ago President Obama released his long form birth certificate. The file is available at: Obama s Long-Form Birth Certificate: Evidence Of Manipulation by Jim March, 4/29/11 As I write this, I have never been publicly or privately associated with the birther movement. You can search the web

More information

CS 051 Homework Laboratory #2

CS 051 Homework Laboratory #2 CS 051 Homework Laboratory #2 Dirty Laundry Objective: To gain experience using conditionals. The Scenario. One thing many students have to figure out for the first time when they come to college is how

More information

CSC-140 Assignment 6

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

More information

Lab 5 Classy Chat. XMPP Client Implementation --- Part 2 Due Oct. 19 at 11PM

Lab 5 Classy Chat. XMPP Client Implementation --- Part 2 Due Oct. 19 at 11PM Lab 5 Classy Chat XMPP Client Implementation --- Part 2 Due Oct. 19 at 11PM In this week s lab we will finish work on the chat client programs from the last lab. The primary goals are: to use multiple

More information

-Using Excel- *The columns are marked by letters, the rows by numbers. For example, A1 designates row A, column 1.

-Using Excel- *The columns are marked by letters, the rows by numbers. For example, A1 designates row A, column 1. -Using Excel- Note: The version of Excel that you are using might vary slightly from this handout. This is for Office 2004 (Mac). If you are using a different version, while things may look slightly different,

More information

4. Java Project Design, Input Methods

4. Java Project Design, Input Methods 4-1 4. Java Project Design, Input Methods Review and Preview You should now be fairly comfortable with creating, compiling and running simple Java projects. In this class, we continue learning new Java

More information

CS 142 Style Guide Grading and Details

CS 142 Style Guide Grading and Details CS 142 Style Guide Grading and Details In the English language, there are many different ways to convey a message or idea: some ways are acceptable, whereas others are not. Similarly, there are acceptable

More information

Lab 2: Booleans, Strings, Random Numbers, Recursion, Variables, Input function

Lab 2: Booleans, Strings, Random Numbers, Recursion, Variables, Input function Lab 2: Booleans, Strings, Random Numbers, Recursion, Variables, Input function Due: Mar25 (Note that this is a 2-week lab) This lab must be done using paired partners. You should choose a different partner

More information

Keep Track of Your Passwords Easily

Keep Track of Your Passwords Easily Keep Track of Your Passwords Easily K 100 / 1 The Useful Free Program that Means You ll Never Forget a Password Again These days, everything you do seems to involve a username, a password or a reference

More information

AI32 Guide to Weka. Andrew Roberts 1st March 2005

AI32 Guide to Weka. Andrew Roberts   1st March 2005 AI32 Guide to Weka Andrew Roberts http://www.comp.leeds.ac.uk/andyr 1st March 2005 1 Introduction Weka is an excellent system for learning about machine learning techniques. Of course, it is a generic

More information

- 1 - Handout #33 March 14, 2014 JAR Files. CS106A Winter

- 1 - Handout #33 March 14, 2014 JAR Files. CS106A Winter CS106A Winter 2013-2014 Handout #33 March 14, 2014 JAR Files Handout by Eric Roberts, Mehran Sahami, and Brandon Burr Now that you ve written all these wonderful programs, wouldn t it be great if you could

More information

Printing Envelopes in Microsoft Word

Printing Envelopes in Microsoft Word Printing Envelopes in Microsoft Word P 730 / 1 Stop Addressing Envelopes by Hand Let Word Print Them for You! One of the most common uses of Microsoft Word is for writing letters. With very little effort

More information

MIS 0855 Data Science (Section 006) Fall 2017 In-Class Exercise (Day 15) Creating Interactive Dashboards

MIS 0855 Data Science (Section 006) Fall 2017 In-Class Exercise (Day 15) Creating Interactive Dashboards MIS 0855 Data Science (Section 006) Fall 2017 In-Class Exercise (Day 15) Creating Interactive Dashboards Objective: Create a dashboard with interactive data filtering using Tableau Learning Outcomes: Understand

More information

Mailman Max. The postcode is a great way to work out the next sorting office a letter should go to, so you ll use that.

Mailman Max. The postcode is a great way to work out the next sorting office a letter should go to, so you ll use that. Mailman Max In this project you will make a main postal sorting office. It will need to sort letters so that they can be put into vans going to the right local sorting offices. The postcode is a great

More information

Read and fill in this page now

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

More information

BCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER COURSE WEBSITE

BCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER   COURSE WEBSITE COURSE WEBSITE http://www.steveguynes.com/bcis3630/bcis3630/default.html Instructor: Dr. Guynes Office: BLB 312H Phone: (940) 565-3110 Office Hours: By Email Email: steve.guynes@unt.edu TEXTBOOK: Starting

More information

Decision Logic: if, if else, switch, Boolean conditions and variables

Decision Logic: if, if else, switch, Boolean conditions and variables CS 1044 roject 4 Summer I 2007 Decision Logic: if, if else, switch, Boolean conditions and variables This programming assignment uses many of the ideas presented in sections 3 through 5 of the course notes,

More information

CSCI 161 Introduction to Computer Science

CSCI 161 Introduction to Computer Science CSCI 161 Introduction to Computer Science Department of Mathematics and Computer Science Lecture 7 File Input/Output Motivation for File I/O So far: Just relying on the user for data input/output (I/O)...

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

Biology 345: Biometry Fall 2005 SONOMA STATE UNIVERSITY Lab Exercise 2 Working with data in Excel and exporting to JMP Introduction

Biology 345: Biometry Fall 2005 SONOMA STATE UNIVERSITY Lab Exercise 2 Working with data in Excel and exporting to JMP Introduction Biology 345: Biometry Fall 2005 SONOMA STATE UNIVERSITY Lab Exercise 2 Working with data in Excel and exporting to JMP Introduction In this exercise, we will learn how to reorganize and reformat a data

More information

Create your first workbook

Create your first workbook Create your first workbook You've been asked to enter data in Excel, but you've never worked with Excel. Where do you begin? Or perhaps you have worked in Excel a time or two, but you still wonder how

More information

6.096 Introduction to C++

6.096 Introduction to C++ MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Massachusetts Institute

More information

[ the academy_of_code] Senior Beginners

[ the academy_of_code] Senior Beginners [ the academy_of_code] Senior Beginners 1 Drawing Circles First step open Processing Open Processing by clicking on the Processing icon (that s the white P on the blue background your teacher will tell

More information

Depending on the computer you find yourself in front of, here s what you ll need to do to open SPSS.

Depending on the computer you find yourself in front of, here s what you ll need to do to open SPSS. 1 SPSS 11.5 for Windows Introductory Assignment Material covered: Opening an existing SPSS data file, creating new data files, generating frequency distributions and descriptive statistics, obtaining printouts

More information

More on Classes. The job of this method is to return a String representation of the object. Here is the tostring method from the Time class:

More on Classes. The job of this method is to return a String representation of the object. Here is the tostring method from the Time class: More on Classes tostring One special method in Java is the tostring method. The method (regardless of which class it s added to) has the following prototype: public String tostring(); The job of this method

More information

Lab 4. Out: Friday, February 25th, 2005

Lab 4. Out: Friday, February 25th, 2005 CS034 Intro to Systems Programming Doeppner & Van Hentenryck Lab 4 Out: Friday, February 25th, 2005 What you ll learn. In this lab, you ll learn to use function pointers in a variety of applications. You

More information

Professor Program. Grading Scantron Exams

Professor Program. Grading Scantron Exams Grading Scantron Exams Grading scantrons consists of five parts: 1. Mechanically scanning the forms 2. Correcting scanning mistakes in the resulting scantron text file 3. Creating a student roster text

More information

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed

More information

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change Chapter01.fm Page 1 Monday, August 23, 2004 1:52 PM Part I The Mechanics of Change The Mechanics of Change Chapter01.fm Page 2 Monday, August 23, 2004 1:52 PM Chapter01.fm Page 3 Monday, August 23, 2004

More information

Remaining Enhanced Labs

Remaining Enhanced Labs Here are some announcements regarding the end of the semester, and the specifications for the last Enhanced Labs. Don t forget that you need to take the Common Final Examination on Saturday, May 5, from

More information

S A M P L E C H A P T E R

S A M P L E C H A P T E R SAMPLE CHAPTER Anyone Can Create an App by Wendy L. Wise Chapter 5 Copyright 2017 Manning Publications brief contents PART 1 YOUR VERY FIRST APP...1 1 Getting started 3 2 Building your first app 14 3 Your

More information

Web API Lab. The next two deliverables you shall write yourself.

Web API Lab. The next two deliverables you shall write yourself. Web API Lab In this lab, you shall produce four deliverables in folder 07_webAPIs. The first two deliverables should be pretty much done for you in the sample code. 1. A server side Web API (named listusersapi.jsp)

More information

Q1: Functions / 33 Q2: Arrays / 47 Q3: Multiple choice / 20 TOTAL SCORE / 100 Q4: EXTRA CREDIT / 10

Q1: Functions / 33 Q2: Arrays / 47 Q3: Multiple choice / 20 TOTAL SCORE / 100 Q4: EXTRA CREDIT / 10 EECE.2160: ECE Application Programming Spring 2018 Exam 2 March 30, 2018 Name: Lecture time (circle 1): 8-8:50 (Sec. 201) 12-12:50 (Sec. 202) For this exam, you may use only one 8.5 x 11 double-sided page

More information

How To Get Your Word Document. Ready For Your Editor

How To Get Your Word Document. Ready For Your Editor How To Get Your Word Document Ready For Your Editor When your document is ready to send to your editor you ll want to have it set out to look as professional as possible. This isn t just to make it look

More information

ECE 122 Engineering Problem Solving with Java

ECE 122 Engineering Problem Solving with Java ECE 122 Engineering Problem Solving with Java Introduction to Programming for ECE Lecture 1 Course Overview Welcome! What is this class about? Java programming somewhat software somewhat Solving engineering

More information

Template Tidbits. Q How do I get the places I can enter copy to show up? (Highlight Fields Bar)

Template Tidbits. Q How do I get the places I can enter copy to show up? (Highlight Fields Bar) Template Tidbits This document is not intended to replace the individual guidance documents that accompany each template. Instead, it is a general document that addresses questions frequently asked by

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

1. Introduction EE108A. Lab 1: Combinational Logic: Extension of the Tic Tac Toe Game

1. Introduction EE108A. Lab 1: Combinational Logic: Extension of the Tic Tac Toe Game EE108A Lab 1: Combinational Logic: Extension of the Tic Tac Toe Game 1. Introduction Objective This lab is designed to familiarize you with the process of designing, verifying, and implementing a combinational

More information

CS112 Lecture: Defining Classes. 1. To describe the process of defining an instantiable class

CS112 Lecture: Defining Classes. 1. To describe the process of defining an instantiable class CS112 Lecture: Defining Classes Last revised 2/3/06 Objectives: 1. To describe the process of defining an instantiable class Materials: 1. BlueJ SavingsAccount example project 2. Handout of code for SavingsAccount

More information

Instructions for Crossword Assignment CS130

Instructions for Crossword Assignment CS130 Instructions for Crossword Assignment CS130 Purposes: Implement a keyboard interface. 1. The program you will build is meant to assist a person in preparing a crossword puzzle for publication. You have

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

Lab 12: Lijnenspel revisited

Lab 12: Lijnenspel revisited CMSC160 Intro to Algorithmic Design Blaheta Lab 12: Lijnenspel revisited 16 April 2015 Today s lab will revisit and rework the Lijnenspel game code from Lab 7, possibly using my version as a starting point.

More information

Arrays/Branching Statements Tutorial:

Arrays/Branching Statements Tutorial: Arrays/Branching Statements Tutorial: In the last tutorial, you created a button that, when you clicked on it (the onclick event), changed another image on the page. What if you have a series of pictures

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

Slide 1. Slide 2. Slide 3

Slide 1. Slide 2. Slide 3 Cognos is the reporting system for SMARTT. It is used to analyze program performance and student demographics. Cognos retrieves data stored in the SMARTT System to create reports that help users answer

More information

Last Time. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu. Readings

Last Time. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu. Readings University of British Columbia CPSC 111, Intro to Computation Alan J. Hu Writing a Simple Java Program Intro to Variables Readings Your textbook is Big Java (3rd Ed). This Week s Reading: Ch 2.1-2.5, Ch

More information

Assignment 2, perquack2 class hierarchy in Java, due 11:59 PM, Sunday March 16, 2014 Login into your account on acad/bill and do the following steps:

Assignment 2, perquack2 class hierarchy in Java, due 11:59 PM, Sunday March 16, 2014 Login into your account on acad/bill and do the following steps: CSC 243 Java Programming, Spring 2014, Dr. Dale E. Parson Assignment 2, perquack2 class hierarchy in Java, due 11:59 PM, Sunday March 16, 2014 Login into your account on acad/bill and do the following

More information

Guessing Game with Objects

Guessing Game with Objects Objectives Lab1: Guessing Game with Objects Guessing Game with Objects 1. Practice designing and implementing an object-oriented program. 2. Use Console I/O in Java. Tasks 1. Design the program (problem

More information

Survey #2. Variable Scope. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu. Readings. Scope Static.

Survey #2. Variable Scope. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu. Readings. Scope Static. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu Scope Static Readings This Week: Ch 8.3-8.8 and into Ch 9.1-9.3 (Ch 9.3-9.8 and Ch 11.1-11.3 in old 2 nd ed) (Reminder: Readings

More information

10 Rules You Should Know To Keep Your Dot Matrix Printer Operational

10 Rules You Should Know To Keep Your Dot Matrix Printer Operational 1 2 from the desk of Ken Feinstein Dear Reader, So many times we repair dot matrix printers that we feel a service call could have been prevented. We ve compiled a list of the most common preventative

More information

MIS0855: Data Science In-Class Exercise for Mar Creating Interactive Dashboards

MIS0855: Data Science In-Class Exercise for Mar Creating Interactive Dashboards MIS0855: Data Science In-Class Exercise for Mar 25-27 Creating Interactive Dashboards Objective: Create a dashboard with interactive data filtering using Tableau Learning Outcomes: Understand how to create

More information

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below. Graphing in Excel featuring Excel 2007 1 A spreadsheet can be a powerful tool for analyzing and graphing data, but it works completely differently from the graphing calculator that you re used to. If you

More information

PowerPoint Basics: Create a Photo Slide Show

PowerPoint Basics: Create a Photo Slide Show PowerPoint Basics: Create a Photo Slide Show P 570 / 1 Here s an Enjoyable Way to Learn How to Use Microsoft PowerPoint Microsoft PowerPoint is a program included with all versions of Microsoft Office.

More information

Karlen Communications Track Changes and Comments in Word. Karen McCall, M.Ed.

Karlen Communications Track Changes and Comments in Word. Karen McCall, M.Ed. Karlen Communications Track Changes and Comments in Word Karen McCall, M.Ed. Table of Contents Introduction... 3 Track Changes... 3 Track Changes Options... 4 The Revisions Pane... 10 Accepting and Rejecting

More information

CS 455 Midterm Exam 2 Fall 2015 [Bono] Nov. 10, 2015

CS 455 Midterm Exam 2 Fall 2015 [Bono] Nov. 10, 2015 Name: USC NetID (e.g., ttrojan): CS 455 Midterm Exam 2 Fall 2015 [Bono] Nov. 10, 2015 There are 9 problems on the exam, with 54 points total available. There are 8 pages to the exam (4 pages double-sided),

More information

Welcome Back! Without further delay, let s get started! First Things First. If you haven t done it already, download Turbo Lister from ebay.

Welcome Back! Without further delay, let s get started! First Things First. If you haven t done it already, download Turbo Lister from ebay. Welcome Back! Now that we ve covered the basics on how to use templates and how to customise them, it s time to learn some more advanced techniques that will help you create outstanding ebay listings!

More information

How do I use BatchProcess

How do I use BatchProcess home news tutorial what can bp do purchase contact us TUTORIAL Written by Luke Malpass Sunday, 04 April 2010 20:20 How do I use BatchProcess Begin by downloading the required version (either 32bit or 64bit)

More information

POFT 2301 INTERMEDIATE KEYBOARDING LECTURE NOTES

POFT 2301 INTERMEDIATE KEYBOARDING LECTURE NOTES INTERMEDIATE KEYBOARDING LECTURE NOTES Be sure that you are reading the textbook information and the notes on the screen as you complete each part of the lessons in this Gregg Keyboarding Program (GDP).

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

Parts are adapted from Windows 98 by Mark Twain Media, Inc. A Computer System has Hardware and Software

Parts are adapted from Windows 98 by Mark Twain Media, Inc. A Computer System has Hardware and Software Parts are adapted from Windows 98 by Mark Twain Media, Inc. A Computer System has Hardware and Software All the parts--monitor, printer, hard drive, etc.-- cables, cabinets, and programs that make a computer

More information

CS102: Variables and Expressions

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

More information

APPM 2360 Lab #2: Facial Recognition

APPM 2360 Lab #2: Facial Recognition APPM 2360 Lab #2: Facial Recognition Instructions Labs may be done in groups of 3 or less. You may use any program; but the TAs will only answer coding questions in MATLAB. One report must be turned in

More information

private static final char[] Alphabet = "abcdefghijklmnopqrstuvwxyz".tochararray();

private static final char[] Alphabet = abcdefghijklmnopqrstuvwxyz.tochararray(); //Shelley Latreille Hang Man Game /* This program plays the game Hang Man with the user. Hang Man is a game that requires the user to guess the letters of a word before running out of incorrect guesses.

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

Chapter 3. Using the System CHANGING CHANNELS USING THE MENUS OPENING THE MENUS CLOSING THE MENUS MENU OPTIONS

Chapter 3. Using the System CHANGING CHANNELS USING THE MENUS OPENING THE MENUS CLOSING THE MENUS MENU OPTIONS CHANGING CHANNELS There are three basic ways to change channels while watching a program: Press the remote control UP or DOWN ARROW button to get to the desired channel. Use the remote control number pad

More information

DIRECTV Message Board

DIRECTV Message Board DIRECTV Message Board DIRECTV Message Board is an exciting new product for commercial customers. It is being shown at DIRECTV Revolution 2012 for the first time, but the Solid Signal team were lucky enough

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

Lab 1: Silver Dollar Game 1 CSCI 2101B Fall 2018

Lab 1: Silver Dollar Game 1 CSCI 2101B Fall 2018 Lab 1: Silver Dollar Game 1 CSCI 2101B Fall 2018 Due: Tuesday, September 18, 11:59 pm Collaboration Policy: Level 1 (review full policy for details) Group Policy: Individual This lab will give you experience

More information

STUDENT LESSON A12 Iterations

STUDENT LESSON A12 Iterations STUDENT LESSON A12 Iterations Java Curriculum for AP Computer Science, Student Lesson A12 1 STUDENT LESSON A12 Iterations INTRODUCTION: Solving problems on a computer very often requires a repetition of

More information

_APP A_541_10/31/06. Appendix A. Backing Up Your Project Files

_APP A_541_10/31/06. Appendix A. Backing Up Your Project Files 1-59863-307-4_APP A_541_10/31/06 Appendix A Backing Up Your Project Files At the end of every recording session, I back up my project files. It doesn t matter whether I m running late or whether I m so

More information

CSC 222: Object-Oriented Programming. Fall Object-oriented design

CSC 222: Object-Oriented Programming. Fall Object-oriented design CSC 222: Object-Oriented Programming Fall 2015 Object-oriented design example: word frequencies w/ parallel lists exception handling System.out.format example: word frequencies w/ objects object-oriented

More information

Lesson 2. Introducing Apps. In this lesson, you ll unlock the true power of your computer by learning to use apps!

Lesson 2. Introducing Apps. In this lesson, you ll unlock the true power of your computer by learning to use apps! Lesson 2 Introducing Apps In this lesson, you ll unlock the true power of your computer by learning to use apps! So What Is an App?...258 Did Someone Say Free?... 259 The Microsoft Solitaire Collection

More information

Objective-C. Stanford CS193p Fall 2013

Objective-C. Stanford CS193p Fall 2013 New language to learn! Strict superset of C Adds syntax for classes, methods, etc. A few things to think differently about (e.g. properties, dynamic binding) Most important concept to understand today:

More information