Remaining Enhanced Labs

Size: px
Start display at page:

Download "Remaining Enhanced Labs"

Transcription

1 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 1:00 3:00 p.m. in one of these rooms (depending on your professor): Section Location of Final Exam 1 (Shultz) Plaza 136 2, 3 (Kramer) Plaza 238 A number of Computer Science faculty are collaborating to produce this exam. The Core Competencies should cover the required material, but note that each problem on the exam may overlap one or more Core Competencies. You will be receiving a copy of my records for which Labs, Participation Activities, and Challenge Activities you have completed. Please check this record against your memory of what you have done and let me know of any errors. This record will also let you see where you stand, grade-wise, in the course, and determine how much last-minute (not really, we still have three whole weeks) work you need to do. Core Competencies WSMA and EAC have been cancelled. They represent important material, but we wanted to cut the number of CC s, and these seemed less essential (WSMA is a lot like the TAP CC s, and EAC is probably pointlessly easy). Also, for Core Competency DOO you will only be required to identify classes and some of their instance variables, not their instance methods. Remaining Enhanced Labs The last Enhanced Labs that you might chose to do are grouped into two categories. Each lab in each category is worth 4 lab points, but we are only adding 8 more lab points to the total. Thus, to get a perfect Lab score, you only have to do 8 points out of these remaining 24 points of Enhanced Labs. And, if you complete more of these, you can get extra credit. Category 1: Working with ArrayList and Creating New Classes Enhanced Lab 99.1 [4 lab points] Your goal on this Lab is to create an application named WordCounter that will ask the user for the name of a file and will then scan that file, counting the number of different words occurring, and produce a report in a data file whose name is the original file name with -counts appended, that lists all the words occurring in alphabetical order, with the number of times each word written next to it. You should assume that the input file has been produced by running the application RemoveNonWords (available in the Labs folder) to remove all bothersome symbols, leaving CS 1050 Spring 2018 Page 83

2 a file that just has a bunch of words (sequences of 0 or more lowercase letters) separated by spaces and end-of-lines. For example, if the user enters the name story where the file story looks like this: good dogs like to eat hot dogs all dogs run and play with dogs hot good time then a file named story-counts should be created that looks like this: all 1 and 1 dogs 4 eat 1 good 2 hot 2 like 1 play 1 run 1 time 1 to 1 with 1 Here are some hints on how to approach this lab: You will need to make a class WordWithCount (or whatever you want to call it) that has as its instance variables a word and the number of times it has been seen. You will need an ArrayList<WordWithCount> variable that stores the list, in alphabetical order, of all the words seen so far. You will need a loop to repeatedly get the next word in the input file. Then you will need to take that string and scan the list until you either find an item in the list that matches the string and increment that object s count, or you find an item in the list that has a word occurring after the string, in which case you need to insert a new item right there, or you hit the end of the list without either of the first two things happening, in which case you need to add a new item on the end of the list. Here is an example showing how the list should look after each word is processed (the WordWithCount objects are shown like <dog,1> and the ArrayList is showing as usual): CS 1050 Spring 2018 Page 84

3 Word processed Resulting List [ ] dog [ <dog,1> ] cat [ <cat,1>, <dog,1> ] zebra [ <cat,1>, <dog,1>, <zebra,1> ] cow [ <cat,1>, <cow,1>, <dog,1>, <zebra,1> ] dog [ <cat,1>, <cow,1>, <dog,2>, <zebra,1> ] Once the input file has been scanned into the list, you will need another loop to create the report file. Enhanced Lab 99.2 [4 lab points] In this Lab you will be using ArrayList to calculate GPA s for a collection of students. Read the entire specification before you design and code your program! Specification Write a Java program to read grades from a file, calculate the grade point averages (GPAs) and write input data and results to an output file (see below for the input data). Use an ArrayList to hold the data stored in instances of the Gpa class you will create. The class has instance variables name (string), a GPA (double), and the total number of credit hours that the student passed with grades of A, B, C or D (integer). Any other grade is not a passing grade and its credit hours should not be counted in the total credits. Each input line contains the name of a student followed by a # and then by unknown number of pairs in the form a blank, an integer representing number of credits followed by a blank and then a letter representing the grade. After all the pairs of credits/grades is a #. Do not assume that there is at least one pair on a line. For example, there could be a line with only John Doe # #. Do NOT store the pairs anywhere in the program; process them fully as you encounter them. To calculate the GPA, assume an A is worth 4 points, a B is 3, C is 2, D is 1 and F is 0. If the pair contains any other value for a grade, the pair should be ignored and move on to the next pair (or the end of the data line denoted by a #). If there are no pairs on a line, the GPA is 0. As soon as it s read, echo the input data to the output file. After all the data has been read, write to the output file three blank lines, then a formatted table with headings giving the student names, GPAs, and the number of hours passed. At the end of the table, print the CS 1050 Spring 2018 Page 85

4 number of students, the average GPA, and the total of the hours passed. If you encounter an error in the input like an invalid letter, output a message to that effect to the output file. The main program consists mostly of calls to methods. Do not use global variables except for any formatting constants you might declare. The file names for this lab are: GPACalculator.java Gpa.java LabGPA-input.txt LabGPA-output.txt The main program The class file containing GPA information The input file The output file Note that the class Gpa contains only the three instance variables described above and a constructor to initialize the instance variables. Use the split method to parse each input line. Help on parsing the input line is at the end of this document. The input data follows. Van Zell David # 4 A 4 B # Toole Nancy # 3 X 3 B 5 A 4 A # Tucker Henry # 5 A 3 F 2 U 4 F # Van Zell Sally # 4 C 6 B # Tucker Becky # 4 A 3 A 2 A 5 A 3 A # Stratton Charles # 2 S 2 D 5 B 4 D 1 C # Toole Charles # 4 U # Nulle, Nellie # # Thomas William # 4 B 5 A 2 D 3 B # Sample output is below. Use leftpad and padstring (or printf) as needed to line up the columns. Do not use tabs. The GPA should be formatted to two decimal places. CS 1050 Spring 2018 Page 86

5 Example: Name GPA Total Credits Van Zell David etc. Totals Average Sum of all credits GPA Hints on Parsing an Input Line The first input line is Van Zell David # 4 A 4 B # Use the split method once with a # as the separator. This creates a 2-element array, say split1, with split1[0] equal to the name (that needs to be trimmed) and split1[1] which contains # 4 A 4 B #. Now, use the split method again on split1[1] with a separator of a blank. This creates a 6-element array, say split2, that has: Index Contents 0 # A B 5 # Process the split2 array accordingly. Remember split2 is a string array, so digits must be converted to integers to be able to process them as integers. CS 1050 Spring 2018 Page 87

6 Enhanced Lab 99.3 [4 lab points] Using an ArrayList, find the sum, average, minimum and maximum of the elements. Specification Write a Java program that does the following: 1. Perform these steps until the user enters a 0. a. Read an integer value from the console. The value can be positive or negative. b. Add the value to an ArrayList. Note that the 0 is not entered into the ArrayList and all this step does is gather the data. No processing as in step 2 is performed. 2. After the user enters a 0, process the ArrayList with one for loop as follows: a. Calculate the total of the values entered. b. Calculate the average of the values entered. Ensure you handle the case of no entries correctly. c. Find the minimum value. d. Find the maximum value. Output to the console, with appropriate messages, the number of values read, the total, average, minimum and maximum values. To get your program checked off, it must be able to handle at least these cases: a. A program run with at least five non-zero numbers entered. b. A program run with only a 0 entered, meaning there are no numbers in the list to process. Write the program as one main method or use a few methods, at your discretion. CS 1050 Spring 2018 Page 88

7 Category 2: Some Fun Projects that Don t Use ArrayList Enhanced Lab 99.4 [4 lab points] This one is for the hard-core mathematicians! You might have seen this algorithm in a calculus class, but if you have only had algebra, you can still do this lab. This Lab asks you to implement an application that will let the user enter a starting guess for the root of a function f(x), and will then use finite-difference Newton s method to efficiently find a root of f to the full accuracy allowed by the machine arithmetic. The idea for this lab is that if you have a number a that you think is a decent guess for the root of some function f(x), then you can find the equation of the line passing through the points (a, f(a)) and (a + h, f(a + h)), and then compute the value of x for which that line crosses the x axis and use it as a better approximation to a root of f. This can all be done inside a loop so that it quickly finds a very accurate approximation to a root of f. Because this isn t a math class, here are all the details that you can use to quite easily implement this application. Note that the user has to actually type in the formula for f(x) and compile and run the application, so it s not for users who don t know how to program in Java at least a little. The slope of the line through (a, f(a)) and (a + h, f(a + h)) is m = f(a + h) f(a), h so the equation of that line is or y f(a) x a = m, y = m(x a) + f(a). If we set y equal to 0 and solve for x, we obtain x = a f(a) m. Then we can use that value as the next value of a and repeat the process. For a typical function f, a good value for h is We want to display the values of a and f(a) inside the loop, and exit the loop when f(a) is less than 10 12, say. Implement these ideas and test them on some function(s) that you know have roots. For example, use f(x) = x 2 3, use 2 as the first value of a and verify that the root, which is 3, is obtained to about 12 decimal places. CS 1050 Spring 2018 Page 89

8 Enhanced Lab 99.5 [4 lab points] The application you will create in this Lab will convert a given dollar amount to words. Specification Convert a number between $0.01 and $ inclusive to words as if you are writing a check. Examples: Data In words $3.14 Three and 14/100 dollars $54.54 Fifty-Four and 54/100 dollars $ One Hundred and 00/100 dollars $ One Thousand Twenty-Four and 54/100 dollars $ Two Thousand Seven Hundred Eighteen and 28/100 dollars The program will repeatedly read numbers from the keyboard, displaying on-screen each one converted to words, stopping when an out-of-range number is entered. You should use at least the test cases given above, but note that your logic should cover every possible in-range number. Enhanced Lab 99.6 [4 lab points] Your job on this Lab is to implement the game Lights Out. Your program must display graphically a 5 by 5 grid of squares, each of which is yellow to represent a light that is on or black to represent a light that is off. When the game starts, each light is randomly (50-50 chance) turned on or off. When the user presses the mouse button on one of the squares, it changes state (off to on or on to off) and similarly flips the state of all 2, 3, or 4 of its horizontal and vertical neighbors. The player wins when they manage to turn off all of the lights (hence the name!). CS 1050 Spring 2018 Page 90

Core Competency DOO (Design Object-Oriented)

Core Competency DOO (Design Object-Oriented) Here is the documentation for the rest of the semester. This document includes specification of the remaining Core Competencies, specifications for the final two Core Labs, and specifications for a number

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, 2016 Instructions: CS1800 Discrete Structures Final 1. The exam is closed book and closed notes. You may

More information

Lab 1 Introduction to R

Lab 1 Introduction to R Lab 1 Introduction to R Date: August 23, 2011 Assignment and Report Due Date: August 30, 2011 Goal: The purpose of this lab is to get R running on your machines and to get you familiar with the basics

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

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

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

More information

CpSc 111 Lab 3 Integer Variables, Mathematical Operations, & Redirection

CpSc 111 Lab 3 Integer Variables, Mathematical Operations, & Redirection CpSc 111 Lab 3 Integer Variables, Mathematical Operations, & Redirection Overview By the end of the lab, you will be able to: declare variables perform basic arithmetic operations on integer variables

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, 2016 Instructions: CS1800 Discrete Structures Final 1. The exam is closed book and closed notes. You may

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

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

CpSc 1011 Lab 3 Integer Variables, Mathematical Operations, & Redirection

CpSc 1011 Lab 3 Integer Variables, Mathematical Operations, & Redirection CpSc 1011 Lab 3 Integer Variables, Mathematical Operations, & Redirection Overview By the end of the lab, you will be able to: declare variables perform basic arithmetic operations on integer variables

More information

A cell is highlighted when a thick black border appears around it. Use TAB to move to the next cell to the LEFT. Use SHIFT-TAB to move to the RIGHT.

A cell is highlighted when a thick black border appears around it. Use TAB to move to the next cell to the LEFT. Use SHIFT-TAB to move to the RIGHT. Instructional Center for Educational Technologies EXCEL 2010 BASICS Things to Know Before You Start The cursor in Excel looks like a plus sign. When you click in a cell, the column and row headings will

More information

Topic 2: Decimals. Topic 1 Integers. Topic 2 Decimals. Topic 3 Fractions. Topic 4 Ratios. Topic 5 Percentages. Topic 6 Algebra

Topic 2: Decimals. Topic 1 Integers. Topic 2 Decimals. Topic 3 Fractions. Topic 4 Ratios. Topic 5 Percentages. Topic 6 Algebra 41 Topic 2: Decimals Topic 1 Integers Topic 2 Decimals Topic 3 Fractions Topic 4 Ratios Duration 1/2 week Content Outline Introduction Addition and Subtraction Multiplying and Dividing by Multiples of

More information

Working with Questions in MathXL for School

Working with Questions in MathXL for School Working with Questions in MathXL for School The pages below provide best practices for entering answers into the MathXL question player to ensure students get proper credit for their answers. When viewing

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

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

Notebook Assignments

Notebook Assignments Notebook Assignments These six assignments are a notebook using techniques from class in the single concrete context of graph theory. This is supplemental to your usual assignments, and is designed for

More information

Simplifying Expressions

Simplifying Expressions Unit 1 Beaumont Middle School 8th Grade, 2017-2018 Math8; Intro to Algebra Name: Simplifying Expressions I can identify expressions and write variable expressions. I can solve problems using order of operations.

More information

CSci 1113, Fall 2015 Lab Exercise 4 (Week 5): Write Your Own Functions. User Defined Functions

CSci 1113, Fall 2015 Lab Exercise 4 (Week 5): Write Your Own Functions. User Defined Functions CSci 1113, Fall 2015 Lab Exercise 4 (Week 5): Write Your Own Functions User Defined Functions In previous labs, you've encountered useful functions, such as sqrt() and pow(), that were created by other

More information

Exam 1. CSI 201: Computer Science 1 Fall 2018 Professors: Shaun Ramsey

Exam 1. CSI 201: Computer Science 1 Fall 2018 Professors: Shaun Ramsey Exam 1 CSI 201: Computer Science 1 Fall 2018 Professors: Shaun Ramsey I understand that this exam is closed books and closed notes and is to be completed without a calculator, phone, or other computer.

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

Spreadsheet View and Basic Statistics Concepts

Spreadsheet View and Basic Statistics Concepts Spreadsheet View and Basic Statistics Concepts GeoGebra 3.2 Workshop Handout 9 Judith and Markus Hohenwarter www.geogebra.org Table of Contents 1. Introduction to GeoGebra s Spreadsheet View 2 2. Record

More information

Why Use Graphs? Test Grade. Time Sleeping (Hrs) Time Sleeping (Hrs) Test Grade

Why Use Graphs? Test Grade. Time Sleeping (Hrs) Time Sleeping (Hrs) Test Grade Analyzing Graphs Why Use Graphs? It has once been said that a picture is worth a thousand words. This is very true in science. In science we deal with numbers, some times a great many numbers. These numbers,

More information

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n)

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n) Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Module 10A Lecture - 20 What is a function?

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

Linux File System and Basic Commands

Linux File System and Basic Commands Linux File System and Basic Commands 0.1 Files, directories, and pwd The GNU/Linux operating system is much different from your typical Microsoft Windows PC, and probably looks different from Apple OS

More information

Course Outline. Introduction to java

Course Outline. Introduction to java Course Outline 1. Introduction to OO programming 2. Language Basics Syntax and Semantics 3. Algorithms, stepwise refinements. 4. Quiz/Assignment ( 5. Repetitions (for loops) 6. Writing simple classes 7.

More information

Claremont McKenna College Computer Science

Claremont McKenna College Computer Science Claremont McKenna College Computer Science CS 51 Handout 4: Problem Set 4 February 10, 2011 This problem set is due 11:50pm on Wednesday, February 16. As usual, you may hand in yours until I make my solutions

More information

CSCI 355 LAB #2 Spring 2004

CSCI 355 LAB #2 Spring 2004 CSCI 355 LAB #2 Spring 2004 More Java Objectives: 1. To explore several Unix commands for displaying information about processes. 2. To explore some differences between Java and C++. 3. To write Java applications

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

Millionaire. Input. Output. Problem limit seconds

Millionaire. Input. Output. Problem limit seconds Millionaire Congratulations! You were selected to take part in the TV game show Who Wants to Be a Millionaire! Like most people, you are somewhat risk-averse, so you might rather take $250,000 than a 50%

More information

MATH 021 UNIT 2 HOMEWORK ASSIGNMENTS

MATH 021 UNIT 2 HOMEWORK ASSIGNMENTS MATH 021 UNIT 2 HOMEWORK ASSIGNMENTS General Instructions You will notice that most of the homework assignments for a section have more than one part. Usually, the part (A) questions ask for explanations,

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

Computational Mathematics/Information Technology. Worksheet 2 Iteration and Excel

Computational Mathematics/Information Technology. Worksheet 2 Iteration and Excel Computational Mathematics/Information Technology Worksheet 2 Iteration and Excel This sheet uses Excel and the method of iteration to solve the problem f(x) = 0. It introduces user functions and self referencing

More information

APCS-AB: Java. Recursion in Java December 12, week14 1

APCS-AB: Java. Recursion in Java December 12, week14 1 APCS-AB: Java Recursion in Java December 12, 2005 week14 1 Check point Double Linked List - extra project grade Must turn in today MBCS - Chapter 1 Installation Exercises Analysis Questions week14 2 Scheme

More information

EDIT202 Spreadsheet Lab Prep Sheet

EDIT202 Spreadsheet Lab Prep Sheet EDIT202 Spreadsheet Lab Prep Sheet While it is clear to see how a spreadsheet may be used in a classroom to aid a teacher in marking (as your lab will clearly indicate), it should be noted that spreadsheets

More information

Pacific Northwest Region Programming Contest Division 2

Pacific Northwest Region Programming Contest Division 2 Pacific Northwest Region Programming Contest Division 2 November 14th, 2015 Reminders For all problems, read the input data from standard input and write the results to standard output. In general, when

More information

1

1 Zeros&asymptotes Example 1 In an early version of this activity I began with a sequence of simple examples (parabolas and cubics) working gradually up to the main idea. But now I think the best strategy

More information

Assignment 4. Aggregate Objects, Command-Line Arguments, ArrayLists. COMP-202B, Winter 2011, All Sections. Due: Tuesday, March 22, 2011 (13:00)

Assignment 4. Aggregate Objects, Command-Line Arguments, ArrayLists. COMP-202B, Winter 2011, All Sections. Due: Tuesday, March 22, 2011 (13:00) Assignment 4 Aggregate Objects, Command-Line Arguments, ArrayLists COMP-202B, Winter 2011, All Sections Due: Tuesday, March 22, 2011 (13:00) You MUST do this assignment individually and, unless otherwise

More information

Spreadsheets for Geniuses

Spreadsheets for Geniuses Spreadsheets for Geniuses Introduction Spreadsheets make use of the great mathematical powers of the computer. Simply put: A Spreadsheet is a computerized ledger that can perform calculations on its data.

More information

LESSON 2 VARIABLES, OPERATORS, EXPRESSIONS, AND USER INPUT

LESSON 2 VARIABLES, OPERATORS, EXPRESSIONS, AND USER INPUT LESSON VARIABLES, OPERATORS, EXPRESSIONS, AND USER INPUT PROF. JOHN P. BAUGH PROFJPBAUGH@GMAIL.COM PROFJPBAUGH.COM CONTENTS INTRODUCTION... Assumptions.... Variables and Data Types..... Numeric Data Types:

More information

Honors Computer Science Python Mr. Clausen Programs 4A, 4B, 4C, 4D, 4E, 4F

Honors Computer Science Python Mr. Clausen Programs 4A, 4B, 4C, 4D, 4E, 4F PROGRAM 4A Full Names (25 points) Honors Computer Science Python Mr. Clausen Programs 4A, 4B, 4C, 4D, 4E, 4F This program should ask the user for their full name: first name, a space, middle name, a space,

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

Principles of computer programming. Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković

Principles of computer programming. Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković Principles of computer programming Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković E-mail: mtanaskovic@singidunum.ac.rs Course organization Lectures: Presentation of concepts and

More information

CMSC 201 Spring 2017 Project 1 Number Classifier

CMSC 201 Spring 2017 Project 1 Number Classifier CMSC 201 Spring 2017 Project 1 Number Classifier Assignment: Project 1 Number Classifier Due Date: Design Document: Saturday, March 11th, 2017 by 8:59:59 PM Project: Friday, March 17th, 2017 by 8:59:59

More information

EECE.2160: ECE Application Programming Spring 2018

EECE.2160: ECE Application Programming Spring 2018 EECE.2160: ECE Application Programming Spring 2018 1. (46 points) C input/output; operators Exam 1 Solution a. (13 points) Show the output of the short program below exactly as it will appear on the screen.

More information

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I BASIC COMPUTATION x public static void main(string [] args) Fundamentals of Computer Science I Outline Using Eclipse Data Types Variables Primitive and Class Data Types Expressions Declaration Assignment

More information

CSCI 355 Lab #2 Spring 2007

CSCI 355 Lab #2 Spring 2007 CSCI 355 Lab #2 Spring 2007 More Java Objectives: 1. To explore several Unix commands for displaying information about processes. 2. To explore some differences between Java and C++. 3. To write Java applications

More information

SCRATCH MODULE 3: NUMBER CONVERSIONS

SCRATCH MODULE 3: NUMBER CONVERSIONS SCRATCH MODULE 3: NUMBER CONVERSIONS INTRODUCTION The purpose of this module is to experiment with user interactions, error checking input, and number conversion algorithms in Scratch. We will be exploring

More information

Math 101 Exam 1 Review

Math 101 Exam 1 Review Math 101 Exam 1 Review Reminder: Exam 1 will be on Friday, October 14, 011 at 8am. It will cover sections 1.1, 1. and 10.1 10.3 Room Assignments: Room Sections Nesbitt 111 9, 14, 3, 4, 8 Nesbitt 15 0,

More information

Assignment 5: Part 1 (COMPLETE) Sprites on a Plane

Assignment 5: Part 1 (COMPLETE) Sprites on a Plane Assignment 5: Part 1 (COMPLETE) Sprites on a Plane COMP-202B, Winter 2011, All Sections Due: Wednesday, April 6, 2011 (13:00) This assignment comes in TWO parts. Part 2 of the assignment will be published

More information

Chapter 1. Math review. 1.1 Some sets

Chapter 1. Math review. 1.1 Some sets Chapter 1 Math review This book assumes that you understood precalculus when you took it. So you used to know how to do things like factoring polynomials, solving high school geometry problems, using trigonometric

More information

Q1: Multiple choice / 20 Q2: C input/output; operators / 40 Q3: Conditional statements / 40 TOTAL SCORE / 100 EXTRA CREDIT / 10

Q1: Multiple choice / 20 Q2: C input/output; operators / 40 Q3: Conditional statements / 40 TOTAL SCORE / 100 EXTRA CREDIT / 10 16.216: ECE Application Programming Spring 2015 Exam 1 February 23, 2015 Name: ID #: For this exam, you may use only one 8.5 x 11 double-sided page of notes. All electronic devices (e.g., calculators,

More information

cd h: mkdir -p CS101 cd CS101 curl -O unzip zipfile cd CS101_Exam4

cd h: mkdir -p CS101 cd CS101 curl -O   unzip zipfile cd CS101_Exam4 CS 101, Spring 2013 May 2nd Exam 4 Note: Make sure your programs produce the output in exactly the format described, including capitalization and punctuation. You may not receive credit for programs that

More information

c) Comments do not cause any machine language object code to be generated. d) Lengthy comments can cause poor execution-time performance.

c) Comments do not cause any machine language object code to be generated. d) Lengthy comments can cause poor execution-time performance. 2.1 Introduction (No questions.) 2.2 A Simple Program: Printing a Line of Text 2.1 Which of the following must every C program have? (a) main (b) #include (c) /* (d) 2.2 Every statement in C

More information

Beginning of Semester To Do List Math 1314

Beginning of Semester To Do List Math 1314 Beginning of Semester To Do List Math 1314 1. Sign up for a CASA account in CourseWare at http://www.casa.uh.edu. Read the "Departmental Policies for Math 13xx Face to Face Classes". You are responsible

More information

This is an individual assignment and carries 100% of the final CPS 1000 grade.

This is an individual assignment and carries 100% of the final CPS 1000 grade. CPS 1000 Assignment This is an individual assignment and carries 100% of the final CPS 1000 grade. Important instructions (read carefully and thoroughly): The firm submission deadline is Friday 5 th February

More information

More About WHILE Loops

More About WHILE Loops More About WHILE Loops http://people.sc.fsu.edu/ jburkardt/isc/week04 lecture 07.pdf... ISC3313: Introduction to Scientific Computing with C++ Summer Semester 2011... John Burkardt Department of Scientific

More information

1. The programming language C is more than 30 years old. True or False? (Circle your choice.)

1. The programming language C is more than 30 years old. True or False? (Circle your choice.) Name: Section: Grade: Answer these questions while viewing the assigned videos. Not sure of an answer? Ask your instructor to explain at the beginning of the next class session. You can then fill in your

More information

Lab 1: Setup 12:00 PM, Sep 10, 2017

Lab 1: Setup 12:00 PM, Sep 10, 2017 CS17 Integrated Introduction to Computer Science Hughes Lab 1: Setup 12:00 PM, Sep 10, 2017 Contents 1 Your friendly lab TAs 1 2 Pair programming 1 3 Welcome to lab 2 4 The file system 2 5 Intro to terminal

More information

CSE100 Principles of Programming with C++

CSE100 Principles of Programming with C++ 1 Instructions You may work in pairs (that is, as a group of two) with a partner on this lab project if you wish or you may work alone. If you work with a partner, only submit one lab project with both

More information

Using Mathcad to Perform Mathematics Charles Nippert

Using Mathcad to Perform Mathematics Charles Nippert Using Mathcad to Perform Mathematics Charles Nippert These notes are designed to be an introduction to Mathcad. They all are a quick tour of the principal features of the Mathcad program. To prepare these

More information

Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides

Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides for both problems first, and let you guys code them

More information

Question 2. [2 points] True False By default, structures are passed-by-reference.

Question 2. [2 points] True False By default, structures are passed-by-reference. CS 101, Spring 2016 May 5th Exam 4 Name: For Questions 1 5, circle True or False. Question 1. [2 points] True False A structure is a user-defined data type. Question 2. [2 points] True False By default,

More information

Advanced Algebra I Simplifying Expressions

Advanced Algebra I Simplifying Expressions Page - 1 - Name: Advanced Algebra I Simplifying Expressions Objectives The students will be able to solve problems using order of operations. The students will identify expressions and write variable expressions.

More information

Due Date: Two Program Demonstrations (Testing and Debugging): End of Lab

Due Date: Two Program Demonstrations (Testing and Debugging): End of Lab CSC 111 Fall 2005 Lab 6: Methods and Debugging Due Date: Two Program Demonstrations (Testing and Debugging): End of Lab Documented GameMethods file and Corrected HighLow game: Uploaded by midnight of lab

More information

SPRING 2017 CSCI 304 LAB1 (Due on Feb-14, 11:59:59pm)

SPRING 2017 CSCI 304 LAB1 (Due on Feb-14, 11:59:59pm) SPRING 2017 CSCI 304 LAB1 (Due on Feb-14, 11:59:59pm) Objectives: Debugger Standard I/O Arithmetic statements IF/Switch structures Looping structures File I/O Strings Pointers Functions Structures Important

More information

Exam 1 Review. MATH Intuitive Calculus Fall Name:. Show your reasoning. Use standard notation correctly.

Exam 1 Review. MATH Intuitive Calculus Fall Name:. Show your reasoning. Use standard notation correctly. MATH 11012 Intuitive Calculus Fall 2012 Name:. Exam 1 Review Show your reasoning. Use standard notation correctly. 1. Consider the function f depicted below. y 1 1 x (a) Find each of the following (or

More information

This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units.

This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units. This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units. Introduction Overview Advancements in technology are

More information

Note that ALL of these points are Intercepts(along an axis), something you should see often in later work.

Note that ALL of these points are Intercepts(along an axis), something you should see often in later work. SECTION 1.1: Plotting Coordinate Points on the X-Y Graph This should be a review subject, as it was covered in the prerequisite coursework. But as a reminder, and for practice, plot each of the following

More information

= 3 + (5*4) + (1/2)*(4/2)^2.

= 3 + (5*4) + (1/2)*(4/2)^2. Physics 100 Lab 1: Use of a Spreadsheet to Analyze Data by Kenneth Hahn and Michael Goggin In this lab you will learn how to enter data into a spreadsheet and to manipulate the data in meaningful ways.

More information

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

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

More information

Post Experiment Interview Questions

Post Experiment Interview Questions Post Experiment Interview Questions Questions about the Maximum Problem 1. What is this problem statement asking? 2. What is meant by positive integers? 3. What does it mean by the user entering valid

More information

Midterm 2 Solutions. CS70 Discrete Mathematics and Probability Theory, Spring 2009

Midterm 2 Solutions. CS70 Discrete Mathematics and Probability Theory, Spring 2009 CS70 Discrete Mathematics and Probability Theory, Spring 2009 Midterm 2 Solutions Note: These solutions are not necessarily model answers. Rather, they are designed to be tutorial in nature, and sometimes

More information

How Do I Choose Which Type of Graph to Use?

How Do I Choose Which Type of Graph to Use? How Do I Choose Which Type of Graph to Use? When to Use...... a Line graph. Line graphs are used to track changes over short and long periods of time. When smaller changes exist, line graphs are better

More information

Divisibility Rules and Their Explanations

Divisibility Rules and Their Explanations Divisibility Rules and Their Explanations Increase Your Number Sense These divisibility rules apply to determining the divisibility of a positive integer (1, 2, 3, ) by another positive integer or 0 (although

More information

CS 211 Programming Practicum Fall 2018

CS 211 Programming Practicum Fall 2018 Due: Wednesday, 11/7/18 at 11:59 pm Infix Expression Evaluator Programming Project 5 For this lab, write a C++ program that will evaluate an infix expression. The algorithm REQUIRED for this program will

More information

AP Computer Science Unit 3. Programs

AP Computer Science Unit 3. Programs AP Computer Science Unit 3. Programs For most of these programs I m asking that you to limit what you print to the screen. This will help me in quickly running some tests on your code once you submit them

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

Name: Unit 3 Beaumont Middle School 8th Grade, Introduction to Algebra

Name: Unit 3 Beaumont Middle School 8th Grade, Introduction to Algebra Unit 3 Beaumont Middle School 8th Grade, 2016-2017 Introduction to Algebra Name: I can identify a function, the domain and range. I can identify a linear relationship from a situation, table, graph and

More information

It is important that you show your work. There are 134 points available on this test.

It is important that you show your work. There are 134 points available on this test. Math 1165 Discrete Math Test April 4, 001 Your name It is important that you show your work There are 134 points available on this test 1 (10 points) Show how to tile the punctured chess boards below with

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

Integers and the Coordinate Plane

Integers and the Coordinate Plane Name Date Class 9A Dear Family, A Family Letter: Understanding Integers The student will begin the study of an important set of numbers called integers. Integers are the set of numbers that include all

More information

Lab 2: Object-Oriented Design 12:00 PM, Jan 31, 2018

Lab 2: Object-Oriented Design 12:00 PM, Jan 31, 2018 CS18 Integrated Introduction to Computer Science Fisler, Nelson Contents Lab 2: Object-Oriented Design 12:00 PM, Jan 31, 2018 1 Terminology 1 2 Class Hierarchy Diagrams 2 2.1 An Example: Animals...................................

More information

CS 150 Introduction to Computer Science 1

CS 150 Introduction to Computer Science 1 CS 150 Introduction to Computer Science 1 Professor: Chadd Williams CS150 Introduction to Computer Science 1 Chadd Williams http://zeus.cs.pacificu.edu/chadd chadd@pacificu.edu Office 202 Strain Office

More information

Applied Calculus. Lab 1: An Introduction to R

Applied Calculus. Lab 1: An Introduction to R 1 Math 131/135/194, Fall 2004 Applied Calculus Profs. Kaplan & Flath Macalester College Lab 1: An Introduction to R Goal of this lab To begin to see how to use R. What is R? R is a computer package for

More information

Lab 4: Strings/While Loops Due Sun, Apr 17 at midnight

Lab 4: Strings/While Loops Due Sun, Apr 17 at midnight Lab 4: Strings/While Loops Due Sun, Apr 17 at midnight For this lab, you must work with a partner. You should choose a new partner. Remember to turn in your peer review. All functions should be commented

More information

CSIS 104 Introduction to Computer Science

CSIS 104 Introduction to Computer Science CSIS 104 Introduction to Computer Science Lecture 1: Administrative Stuff The Definition of Computer Science Informal and Formal Definitions of Algorithms Prof. Dr. Slim Abdennadher slim.abdennadher@guc.edu.eg

More information

CS261: HOMEWORK 2 Due 04/13/2012, at 2pm

CS261: 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 information

In math, the rate of change is called the slope and is often described by the ratio rise

In math, the rate of change is called the slope and is often described by the ratio rise Chapter 3 Equations of Lines Sec. Slope The idea of slope is used quite often in our lives, however outside of school, it goes by different names. People involved in home construction might talk about

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

Australian Informatics Olympiad Thursday 23 August, Information Booklet

Australian Informatics Olympiad Thursday 23 August, Information Booklet Australian Informatics Olympiad Thursday 23 August, 2018 Information Booklet Information for Teachers and Students Contest Rules Why Did I Score Zero? Please read this booklet before the day of the contest

More information

User Manual. Version 3.1. Copyright 2000 Academia Software Solutions All Rights Reserved

User Manual. Version 3.1. Copyright 2000 Academia Software Solutions All Rights Reserved The GR System User Manual Version 3.1 Copyright 2000 Academia Software Solutions All Rights Reserved All contents of this manual are copyrighted by Academia Software Solutions. The information contained

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

LOOPS. Repetition using the while statement

LOOPS. Repetition using the while statement 1 LOOPS Loops are an extremely useful feature in any programming language. They allow you to direct the computer to execute certain statements more than once. In Python, there are two kinds of loops: while

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

CS/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 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 information

2. INTRODUCTORY EXCEL

2. INTRODUCTORY EXCEL CS130 - Introductory Excel 1 2. INTRODUCTORY EXCEL Fall 2017 CS130 - Introductory Excel 2 Introduction to Excel What is Microsoft Excel? What can we do with Excel? CS130 - Introductory Excel 3 Launch Excel

More information

COMP 202 Java in one week

COMP 202 Java in one week CONTENTS: Basics of Programming Variables and Assignment Data Types: int, float, (string) Example: Implementing a calculator COMP 202 Java in one week The Java Programming Language A programming language

More information

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website:

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: https://users.wpi.edu/~sjarvis/ece2049_smj/ We will come around checking your pre-labs

More information

Summer Math Assignments for Students Entering Algebra II

Summer Math Assignments for Students Entering Algebra II Summer Math Assignments for Students Entering Algebra II Purpose: The purpose of this packet is to review pre-requisite skills necessary for the student to be successful in Algebra II. You are expected

More information