CS161: Introduction to Computer Science Homework Assignment 10 Due: Monday 11/28 by 11:59pm
|
|
- Arabella Hawkins
- 6 years ago
- Views:
Transcription
1 CS161: Introduction to Computer Science Homework Assignment 10 Due: Monday 11/28 by 11:59pm Many cable packages come with a search interface that let s you search for a show or movie by typing the name one letter at a time using your remote control. For example, consider the keyboard shown below: Suppose we want to know if any of the Harry Potter movies are showing. Starting with the cursor at a and using the up, down, left, and right buttons on our remote control, we would push the following sequence of buttons: h ( down, right, select ) a ( up, left, select ) r ( right 5 times, down 2 times, select, select ) y ( down 2 times, left 5 times, select ) ( up 5 times, select ) p ( down 3 times, right 3 times, select ) o ( left, select ) t ( left, down, select, select ) e ( up 3 times, right 3 times, select ) r ( down 2 times, right, select ) In total, we had to push 52 buttons just to type the 12-character title Harry Potter. You can imagine how tiring and tedious this becomes! One idea to reduce the number of button pushes is to examine different arrangements of the keys on the keyboard. Here are some examples of different arrangements we could try: u v w x y z Here, the keys are all laid out in a single row. Another idea is to arrange the keys using a QWERTY layout: 1
2 Assuming the cursor started at the upper-left key ( q ), this arrangement would require only 45 buttons to type Harry Potter. In general, there are lots of different arrangements we could experiment with to find the one that requires (on average) the fewest number of key presses. In this assignment, you will implement two classes: Key and Keyboard. The Key class represents a key on the keyboard. The Keyboard class will use a two-dimensional array to represent the keyboard itself. Your Keyboard class should be general enough that it can represent different arrangements. Finally, you will experiment to see which arrangements are the best i.e., which arrangements require the fewest button pushes. The starter code for this assignment contains a Controller class which you can read about at the end of this writeup. The Key class Create a new Java class named Key. This class should represent a single key on the keyboard. Looking at the pictures above, what state (i.e. instance variables) and what methods should a key have? It s extremely important that you stop and spend some time thinking about this question. When I thought about this question, I came up with the following: a key can be represented using a symbol, a row index, and a column index. These then should be the instance variables in your Key class. In terms of methods, it seems like a key needs only basic methods such as a constructor, accessors, and a tostring method. Note that it doesn t make sense for a key to have mutator methods once the instance variables are initialized in the constructor they shouldn t change. 1 It would also be useful to have a method that takes in another key and computes the distance between this key and the other key. As such, you should add the following method to your Key class: public int distance(key other) The distance between two keys on a keyboard is simply the difference between their rows plus the difference between their columns. For example, suppose we had a key at position (3,2) i.e. row 3, column 2 and another key at (5,4) i.e. row 5, column 4. Then the distance between these two keys is: = = 4 You can use the abs method in the Java Math class to take the absolute value. 1 You might have thought the Key class should have a push method. Depending upon the application, this could definitely be useful. 2
3 Keyboard class The second Java class is a Keyboard class that represents the keyboard itself using a 2-dimensional array. This class should have the following methods: 1. public Keyboard(String chars, int numcolumns) A constructor that takes a string containing the sequence of characters on the keyboard, and the number of columns in each row. Look at the Controller class to see an example of how the constructor is called. The constructor should create and initialize the 2-dimensional array. Given the number of columns and the sequence of characters, you will need to compute the number of rows. You may need to use the ceil function in the Math class to help you round up. 2. public int pressesrequired(string text) A method that takes a piece of text (e.g. Harry Potter ) and computes the number of key presses required to navigate to and select each character in the string. The cursor should always start at row 0, column 0 on the keyboard. You can ignore any characters in the text that are not in the keyboard. 3. public String tostring() - A method that returns a string representation of the keyboard. Feel free to add private methods to help you keep your code organized and your methods short. Below is what my solution outputs when I run the Controller class: It took 58 key presses to type It took 97 key presses to type It took 45 key presses to type It took 87 key presses to type It took 309 key presses to type It took 727 key presses to type 3
4 It took 331 key presses to type It took 907 key presses to type It took 224 key presses to type It took 544 key presses to type It took 247 key presses to type It took 568 key presses to type 4
5 The Controller class Come up with your own keyboard arrangement that takes fewer key presses than KEYS1 and KEYS2 on the text LONG TEXT. This variable contains the opening lines of the book Moby Dick. You can experiment with the ordering of the characters as well as the number of columns. You should add your keyboard as a new static variable called KEYS3. Style Guide Before you submit your assignment, go through the checklist below and make sure your code conforms to the style guide. Checklist All unused variables are deleted All instance variables are used in more than one method (if not, make them local) Javadoc comment for all classes All methods have Javadoc comments (except for the main method) All numbers have been replaced with constants (i.e. no magic numbers) Proper capitalization of variables, methods, and classes Use white space to separate different sections of your code Read the Style Guide (under Resources on the course website) for more information. Submitting your homework assignment You should submit your hw10 folder with the Key, Keyboard, and Controller class inside. Please rename your folder before you zip it and upload to Moodle. 5
Moodle 2.2 Student User Guide My Private Files
Moodle 2.2 Student User Guide My Private Files Using My Private Files My Private Files saves files in the cloud. Only the user may access it, but you can access it from any computer where you can access
More informationNote: 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 informationTips 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 informationEE 422C HW 6 Multithreaded Programming
EE 422C HW 6 Multithreaded Programming 100 Points Due: Monday 4/16/18 at 11:59pm Problem A certain theater plays one show each night. The theater has multiple box office outlets to sell tickets, and the
More informationThis exam is open book. Each question is worth 3 points.
This exam is open book. Each question is worth 3 points. Page 1 / 15 Page 2 / 15 Page 3 / 12 Page 4 / 18 Page 5 / 15 Page 6 / 9 Page 7 / 12 Page 8 / 6 Total / 100 (maximum is 102) 1. Are you in CS101 or
More informationCMPSCI 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 informationTips 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************ THIS PROGRAM IS NOT ELIGIBLE FOR LATE SUBMISSION. ALL SUBMISSIONS MUST BE RECEIVED BY THE DUE DATE/TIME INDICATED ABOVE HERE
Program 10: 40 points: Due Tuesday, May 12, 2015 : 11:59 p.m. ************ THIS PROGRAM IS NOT ELIGIBLE FOR LATE SUBMISSION. ALL SUBMISSIONS MUST BE RECEIVED BY THE DUE DATE/TIME INDICATED ABOVE HERE *************
More informationCS 2223 B15 Term. Homework 1 (100 pts.)
CS 2223 B15 Term. Homework 1 (100 pts.) Homework Instructions This homework is to be completed individually. If you have any questions as to what constitutes improper behavior, review the examples I have
More informationTips 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 informationAP Computer Science Chapter 10 Implementing and Using Classes Study Guide
AP Computer Science Chapter 10 Implementing and Using Classes Study Guide 1. A class that uses a given class X is called a client of X. 2. Private features of a class can be directly accessed only within
More informationCPSC 233: Assignment 4 (Due March 26 at 4 PM)
CPSC 233: Assignment 4 (Due March 26 at 4 PM) New learning concepts: Problem solving using object-oriented programming. Aside from main() you cannot implement other static methods. Also you should not
More informationCS 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 informationYou 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 informationEncapsulation. Administrative Stuff. September 12, Writing Classes. Quick review of last lecture. Classes. Classes and Objects
Administrative Stuff September 12, 2007 HW3 is due on Friday No new HW will be out this week Next Tuesday we will have Midterm 1: Sep 18 @ 6:30 7:45pm. Location: Curtiss Hall 127 (classroom) On Monday
More informationCMPSCI 187 / Spring 2015 Sorting Kata
Due on Thursday, April 30, 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 informationCS159 - Assignment 2b
CS159 - Assignment 2b Due: Tuesday, Sept. 23 at 2:45pm For the main part of this assignment we will be constructing a number of smoothed versions of a bigram language model and we will be evaluating its
More informationOur 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 informationUnit 1: Working With Tables
Unit 1: Working With Tables Unit Overview This unit covers the basics of working with Tables and the Table wizard. It does not include working with fields, which is covered in Units 3 and 4. It is divided
More informationCS1110 Spring 2010 Assignment A6. Images. Due Sat. Apr 17, 11:59pm on the CMS 1
CS1110 Spring 2010 Assignment A6. Images. Due Sat. Apr 17, 11:59pm on the CMS 1 0. Introduction Read this entire document carefully. Budget your time wisely. Don't wait until the day before the deadline
More informationUNIVERSITY OF MASSACHUSETTS LOWELL Department of Electrical and Computer Engineering. Program 9 EECE.3220 Data Structures Fall 2017
UNIVERSITY OF MASSACHUSETTS LOWELL Department of Electrical and Computer Engineering Program 9 EECE.3220 Data Structures Fall 2017 Heaps and Heap Sort Word Counter Application Revisited The object of this
More informationCS 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 informationAnatomy of a Method. HW3 is due Today. September 15, Midterm 1. Quick review of last lecture. Encapsulation. Encapsulation
Anatomy of a Method September 15, 2006 HW3 is due Today ComS 207: Programming I (in Java) Iowa State University, FALL 2006 Instructor: Alexander Stoytchev Midterm 1 Next Tuesday Sep 19 @ 6:30 7:45pm. Location:
More informationEECS168 Exam 3 Review
EECS168 Exam 3 Review Exam 3 Time: 2pm-2:50pm Monday Nov 5 Closed book, closed notes. Calculators or other electronic devices are not permitted or required. If you are unable to attend an exam for any
More informationComputer Science 136 Assignment 2 Mazes Due: Monday, at noon.
Computer Science 136 Assignment 2 Mazes Due: Monday, at noon. This week we are going to develop some classes that allow us to experiment with mazes. All of these classes share a common interface: the participant
More informationInteractive PDFs Start
Interactive PDFs Introduction Generally, we use the term interactive PDF when we re talking about a PDF file that is meant to be viewed on screen. The interactive PDF features are the parts of a PDF that
More informationCS 251 Intermediate Programming Methods and Classes
CS 251 Intermediate Programming Methods and Classes Brooke Chenoweth University of New Mexico Fall 2018 Methods An operation that can be performed on an object Has return type and parameters Method with
More informationCS 251 Intermediate Programming Methods and More
CS 251 Intermediate Programming Methods and More Brooke Chenoweth University of New Mexico Spring 2018 Methods An operation that can be performed on an object Has return type and parameters Method with
More informationCS 161 Computer Security
Popa & Wagner Spring 2016 CS 161 Computer Security Homework 2 Due: Monday, February 22nd, at 11:59pm Instructions. This homework is due Monday, February 22nd, at 11:59pm. It must be submitted electronically
More informationCMPSCI 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 informationEducational Fusion. Implementing a Production Quality User Interface With JFC
Educational Fusion Implementing a Production Quality User Interface With JFC Kevin Kennedy Prof. Seth Teller 6.199 May 1999 Abstract Educational Fusion is a online algorithmic teaching program implemented
More informationAddress book. Presenting the Java assignment about an Address Book v
Address book Presenting the Java assignment about an Address Book v.2-2018 Description Make an address book Text interface (command line) Stores contacts between runs Topics and skills covered error handling
More informationOur 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 informationAdvanced Techniques. Criterion E: Product development. Three or more related tables. Complex queries / Calculated fields. Use of graphics fields
Criterion E: Product development Advanced Techniques Three or more related tables Complex queries / Calculated fields Use of graphics fields Proficient design of reports and/or forms Proficient use of
More informationThe first time you open Word
Microsoft Word 2010 The first time you open Word When you open Word, you see two things, or main parts: The ribbon, which sits above the document, and includes a set of buttons and commands that you use
More informationTips from the experts: How to waste a lot of time on this assignment
Com S 227 Fall 2017 Assignment 1 100 points Due Date: Monday, September 18, 11:59 pm (midnight) Late deadline (25% penalty): Tuesday, September 19, 11:59 pm General information This assignment is to be
More informationCIS 162 Project 4 Farkle (a dice game)
CIS 162 Project 4 Farkle (a dice game) Due Date at the start of class on Monday, 3 December (be prepared for quick demo and zybook test) Before Starting the Project Read chapter 10 (ArrayList) and 13 (arrays)
More informationEPORTFOLIO CHECK-IN & FINAL ASSIGNMENTS
EPORTFOLIO CHECK-IN & FINAL ASSIGNMENTS The following are the different pages/assignments included in the Modules. For an 8 week semester these assignments are released every 2 weeks. For a 16 week semester
More informationChapter 4: Writing Classes
Chapter 4: Writing Classes Java Software Solutions Foundations of Program Design Sixth Edition by Lewis & Loftus Writing Classes We've been using predefined classes. Now we will learn to write our own
More informationLab 3: Call to Order CSCI 2101 Fall 2018
Due: Monday, October 15, 11:59 pm Collaboration Policy: Level 1 Group Policy: Pair-Optional Lab 3: Call to Order CSCI 2101 Fall 2018 This week s lab will explore sorting, lists, and basic data analysis.
More informationCSE 143: Computer Programming II Winter 2019 HW6: AnagramSolver (due Thursday, Feb 28, :30pm)
CSE 143: Computer Programming II Winter 2019 HW6: AnagramSolver (due Thursday, Feb 28, 2019 11:30pm) This assignment focuses on recursive backtracking. Turn in the following files using the link on the
More informationProgramming Project 5: NYPD Motor Vehicle Collisions Analysis
: NYPD Motor Vehicle Collisions Analysis Due date: Dec. 7, 11:55PM EST. You may discuss any of the assignments with your classmates and tutors (or anyone else) but all work for all assignments must be
More informationBasic Operations jgrasp debugger Writing Programs & Checkstyle
Basic Operations jgrasp debugger Writing Programs & Checkstyle Suppose you wanted to write a computer game to play "Rock, Paper, Scissors". How many combinations are there? Is there a tricky way to represent
More informationWriteup 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 informationCom 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 informationUNIVERSITY OF MASSACHUSETTS LOWELL Department of Electrical and Computer Engineering. Program 8 EECE.3220 Data Structures Fall 2017
UNIVERSITY OF MASSACHUSETTS LOWELL Department of Electrical and Computer Engineering Program 8 EECE.3220 Data Structures Fall 2017 Binary Search Trees and Class Templates Word Counter Application The object
More informationCS 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 informationCS 170 Java Programming 1. Week 12: Creating Your Own Types
CS 170 Java Programming 1 Week 12: Creating Your Own Types What s the Plan? Topic 1: A Little Review Work with loops to process arrays Write functions to process 2D Arrays in various ways Topic 2: Creating
More informationCS 101 Exam 1 Spring 200 Id Name
This exam is open text book and closed notes. Different questions have different points associated with them with later occurring questions having more worth than the beginning questions. Because your
More informationCSE 143: Computer Programming II Summer 2017 HW5: Anagrams (due Thursday, August 3, :30pm)
CSE 143: Computer Programming II Summer 2017 HW5: Anagrams (due Thursday, August 3, 2017 11:30pm) This assignment focuses on recursive backtracking. Turn in the following files using the link on the course
More informationComputer. CSE 373 Summer 2017 Due 5:00pm on Friday, July 14th
CSE 373 Summer 2017 Due 5:00pm on Friday, July 14th Pair-Programming Opportunity For this assignment, you may work with a partner through pair-programming, where you write all your code together as two
More informationHomework 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 informationText Generator Due Sunday, September 17, 2017
Text Generator Due Sunday, September 17, 2017 Objectives For this assignment, you will: Gain practice using Java generics Gain practice using the ArrayList and Association classes Gain proficiency in using
More informationCreating accessible forms
Creating accessible forms Introduction Creating an accessible form can seem tricky. Some of the questions people commonly ask include: Can I use protected forms? How do I lay out my prompts and questions?
More informationI. True/False: (2 points each)
CS 102 - Introduction to Programming Midterm Exam #2 - Prof. Reed Fall 2009 What is your name?: There are three sections: I. True/False..............50 points; (25 questions, 2 points each) II. Multiple
More informationE-Business Systems 1 INTE2047 Lab Exercises. Lab 5 Valid HTML, Home Page & Editor Tables
Lab 5 Valid HTML, Home Page & Editor Tables Navigation Topics Covered Server Side Includes (SSI) PHP Scripts menu.php.htaccess assessment.html labtasks.html Software Used: HTML Editor Background Reading:
More informationKing Abdulaziz University Faculty of Computing and Information Technology Computer Science Department
King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department CPCS203, 1 st Term 2013 Program 2: KAU Air Booking System (Objects & Classes) Assigned: Wednesday,
More informationComputer Basics. Need more help? What s in this guide? Types of computers and basic parts. Why learn to use a computer?
Computer Basics What s in this guide? The purpose of this guide is to help you feel more comfortable using a computer. You will learn: The similarities and differences between laptop, desktop, and tablet
More informationHomework 2: Imperative Due: 5:00 PM, Feb 15, 2019
CS18 Integrated Introduction to Computer Science Fisler Homework 2: Imperative Due: 5:00 PM, Feb 15, 2019 Contents 1 Overview of Generic/Parameterized Types 2 2 Double the Fun with Doubly-Linked Lists
More informationpublic static String[] manyme() {
UNCA CSCI 202 Middle Exam 2013 9 April, 2013 This is a closed book and closed notes exam. It is a 100-minute exam to be given within the regular class meeting time. Calculators, PDA s, cell phones, and
More informationExcel & Business Math Video/Class Project #01 Introduction to Excel. Why We Use Excel for Math. First Formula.
Excel & Business Math Video/Class Project #01 Introduction to Excel. Why We Use Excel for Math. First Formula. Topics Covered in Video: 1) USB Drive to store files from class... 2 2) Save As to Download
More informationCmSc 150 Fundamentals of Computing I. Lesson 28: Introduction to Classes and Objects in Java. 1. Classes and Objects
CmSc 150 Fundamentals of Computing I Lesson 28: Introduction to Classes and Objects in Java 1. Classes and Objects True object-oriented programming is based on defining classes that represent objects with
More informationTutorial: Input Grades in Blackboard
Tutorial: Input Grades in Blackboard Get into the Grade Center The following steps will lead you to the Full Grade Center page (❶ - ❽). ❶ Enter the URL: blackboard.indstate.edu ❷ Enter username and password
More informationCom S 227 Assignment Submission HOWTO
Com S 227 Assignment Submission HOWTO This document provides detailed instructions on: 1. How to submit an assignment via Canvas and check it 3. How to examine the contents of a zip file 3. How to create
More informationPace University. Fundamental Concepts of CS121 1
Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction
More informationAlternate Appendix A: Using the TI-92 Calculator
Alternate Appendix A: Using the TI-92 Calculator This document summarizes TI-92 calculation and programming operations as they relate to the text, Inside Your Calculator. Even those who do not read the
More informationCS 302: Introduction to Programming in Java. Lecture 15
CS 302: Introduction to Programming in Java Lecture 15 Class Instances of the class (objects) only valid at runtime Private Instance Methods Instance methods usually public why? If we have an internal
More informationArrays: Higher Dimensional Arrays. CS0007: Introduction to Computer Programming
Arrays: Higher Dimensional Arrays CS0007: Introduction to Computer Programming Review If the == operator has two array variable operands, what is being compared? The reference variables held in the variables.
More informationCS 315 Software Design Homework 3 Preconditions, Postconditions, Invariants Due: Sept. 29, 11:30 PM
CS 315 Software Design Homework 3 Preconditions, Postconditions, Invariants Due: Sept. 29, 11:30 PM Objectives Defining a wellformed method to check class invariants Using assert statements to check preconditions,
More informationProgramming Assignment #2
Programming Assignment #2 Due: 11:59pm, Wednesday, Feb. 13th Objective: This assignment will provide further practice with classes and objects, and deepen the understanding of basic OO programming. Task:
More informationCOMP 250 Winter 2011 Reading: Java background January 5, 2011
Almost all of you have taken COMP 202 or equivalent, so I am assuming that you are familiar with the basic techniques and definitions of Java covered in that course. Those of you who have not taken a COMP
More informationCISC 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 informationif (x == 0); System.out.println( x=0 ); if (x = 0) System.out.println( x=0 );
Sample Final Exam 1. Evaluate each of the following expressions and show the result and data type of each: Expression Value Data Type 14 % 5 1 / 2 + 1 / 3 + 1 / 4 4.0 / 2.0 Math.pow(2.0, 3.0) (double)(2
More informationCS201 - 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 informationComputer learning Center at Ewing. Course Notes - Using Picasa
1st January 2014 Computer learning Center at Ewing Course Notes - Using Picasa These course notes describe the content of the Using Picasa course. The course notes are based on Picasa 3. This course material
More informationCS/ENGRD 2110 SPRING Lecture 3: Fields, getters and setters, constructors, testing
1 CS/ENGRD 2110 SPRING 2019 Lecture 3: Fields, getters and setters, constructors, testing http://courses.cs.cornell.edu/cs2110 CS2110 Announcements 2 Take course S/U? OK with us. Check with your advisor/major.
More informationProblem 1: Building the BookCollection application
CSCI 200 Lab 10 Creating and Using Maps In this lab, you will implement a BookCollection application using Java s HashMap class. You ll then create and test your own tree-based map and use it in your BookCollection
More informationProctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.
QUEEN'S UNIVERSITY SCHOOL OF COMPUTING HAND IN Answers Are Recorded on Question Paper CISC124, WINTER TERM, 2012 FINAL EXAMINATION 9am to 12pm, 26 APRIL 2012 Instructor: Alan McLeod If the instructor is
More informationPrelim 1. CS 2110, September 29, 2016, 7:30 PM Total Question Name Loop invariants
Prelim 1 CS 2110, September 29, 2016, 7:30 PM 0 1 2 3 4 5 Total Question Name Loop invariants Recursion OO Short answer Exception handling Max 1 15 15 25 34 10 100 Score Grader The exam is closed book
More informationCS 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 informationCSE 8B Intro to CS: Java
CSE 8B Intro to CS: Java Winter, 2006 January 10 (Day 1) Introduction Unit Testing Administrative Details Programming assignments (30%) Weekly Due Monday night (midnight) Lowest assignment dropped Quizzes
More informationCS1 Studio Project: Connect Four
CS1 Studio Project: Connect Four Due date: November 8, 2006 In this project, we will implementing a GUI version of the two-player game Connect Four. The goal of this project is to give you experience in
More information1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4. Epic Test Review 5 Epic Test Review 6 Epic Test Review 7 Epic Test Review 8
Epic Test Review 1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4 Write a line of code that outputs the phase Hello World to the console without creating a new line character. System.out.print(
More informationEKTRON 101: THE BASICS
EKTRON 101: THE BASICS Table of Contents INTRODUCTION... 2 TERMINOLOGY... 2 WHY DO SOME PAGES LOOK DIFFERENT THAN OTHERS?... 5 LOGGING IN... 8 Choosing an edit mode... 10 Edit in context mode (easy editing)...
More informationUser Interfaces Assignment 3: Heuristic Re-Design of Craigslist (English) Completed by Group 5 November 10, 2015 Phase 1: Analysis of Usability Issues Homepage Error 1: Overall the page is overwhelming
More informationAssignment 1 due Monday at 11:59pm
Assignment 1 due Monday at 11:59pm The heart of Object-Oriented Programming (Now it gets interesting!) Reading for next lecture is Ch. 7 Focus on 7.1, 7.2, and 7.6 Read the rest of Ch. 7 for class after
More informationThese bit positions are represented by numerical values, as defined in list.h.
CS305 Programming Assignment #3: Lovely Linked Lists with Starter Code Out: Feb 19, 015. Due: Mar 3, 015 by 11:00 pm on the CS305 Moodle site. Total points: 100. approximately 0% of the total homework
More informationBinghamton University. CS-140 Fall Problem Solving. Creating a class from scratch
Problem Solving Creating a class from scratch 1 Recipe for Writing a Class 1. Write the class boilerplate stuff 2. Declare Fields 3. Write Creator(s) 4. Write accessor methods 5. Write mutator methods
More informationLab 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 informationLab 3: Call to Order CSCI 2101 Fall 2017
Lab 3: Call to Order CSCI 2101 Fall 2017 Due: Part 1: Tuesday, Oct 3, 11:59 pm, Part 2: Wednesday, Oct 11, 11:59 pm Collaboration Policy: Level 1 Group Policy: Part 1: Individual, Part 2: Pair-Optional
More informationAssignment #1 Simple C++
Eric Roberts Handout #5 CS 106B January 7, 2015 Assignment #1 Simple C++ Due: Friday, January 16 Part 1. Get Qt Creator working Parts of this handout were written by Julie Zelenski. Your first task is
More informationCS261: HOMEWORK 2 Due 04/13/2012, at 2pm
CS261: HOMEWORK 2 Due 04/13/2012, at 2pm Submit six *.c files via the TEACH website: https://secure.engr.oregonstate.edu:8000/teach.php?type=want_auth 1. Introduction The purpose of HW2 is to help you
More informationAberLearn Blackboard User Guide
AberLearn Blackboard User Guide Contents General Guide... 2 Modules & Content... 3 Assignment Submission... 4 Further Thoughts... 5 Blackboard is the virtual learning environment used by Aberystwyth University
More informationCS 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 informationSlide 1 CS 170 Java Programming 1
CS 170 Java Programming 1 Objects and Methods Performing Actions and Using Object Methods Slide 1 CS 170 Java Programming 1 Objects and Methods Duration: 00:01:14 Hi Folks. This is the CS 170, Java Programming
More informationCS 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 informationUse the Move tool to drag A around and see how the automatically constructed objects (like G or the perpendicular and parallel lines) are updated.
Math 5335 Fall 2015 Lab #0: Installing and using GeoGebra This semester you will have a number of lab assignments which require you to use GeoGebra, a dynamic geometry program. GeoGebra lets you explore
More informationCS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG
CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG 1 Notice Reading Assignment Chapter 1: Introduction to Java Programming Homework 1 It is due this coming Sunday
More informationThursday, February 16, More C++ and root
More C++ and root Today s Lecture Series of topics from C++ Example of thinking though a problem Useful physics classes in ROOT Functions by this point you are used to the syntax of a function pass by
More informationWindows 8.1. Tiles come in four shapes: small, medium, wide, and large. The red outlined tiles are live tiles.
Windows 8/8.1 was Microsoft s attempt to have one operating system for all devices desktops, laptops, phones, tablets, and everything else. Some like it more than others. Microsoft Windows 10 is supposed
More information