Introduction to Computer Programming (CS 1323) Project 9



Similar documents
Computer Programming I

CS 2112 Spring Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions

INFSCI 0017 Fundamentals of Object- Oriented Programming

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

PLV Goldstein 315, Tuesdays and Thursdays, 6:00PM-7:50PM. Tuesdays and Thursdays, 4:00PM-5:30PM and 7:50PM 9:30PM at PLV G320

CS 1340 Sec. A Time: 8:00AM, Location: Nevins Instructor: Dr. R. Paul Mihail, 2119 Nevins Hall, rpmihail@valdosta.

Computer Science 1015F ~ 2010 ~ Notes to Students

PA2: Word Cloud (100 Points)

Introduction to Organizational Behavior (Business 260)

Brazosport College Syllabus for PSYC 2301 General Psychology

D2L Overview Sept/Oct 2011

COURSE REQUIREMENTS AND EXPECTATIONS FOR ALL STUDENTS ENROLLED IN COLLEGE ALGEBRA ROWAN UNIVERSITY CAMDEN CAMPUS SPRING 2011

INFSCI 1017 Implementation of Information Systems

Iteration CHAPTER 6. Topic Summary

10 Java API, Exceptions, and Collections

CS 2302 Data Structures Spring 2015

1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders

Personality Psychology (PSYC 330) Summer 2015

Fundamentals of Java Programming

Introduction to Programming System Design. CSCI 455x (4 Units)

Introduction to Programming II Winter, 2014 Assignment 2

Introduction to Java

Some Scanner Class Methods

CSC 241 Introduction to Computer Science I

Software Development (CS2500)

Creating and grading assignments

Change Impact Analysis

Introduction to Java Programming ITP 109 (2 Units) Fall 2015

AppendixA1A1. Java Language Coding Guidelines. A1.1 Introduction

T-Square Training Workshop for TAs

Geography 676 Web Spatial Database Development and Programming

AMERICAN NATIONAL GOVERNMENT University of Central Oklahoma Department of Political Science

Psychology 261, Fall 2012 Physiological Psychology

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game

MATH : College Algebra Fall 2013

Computer Science CS 2334: Programming structures and abstractions

Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459)

CSE 308. Coding Conventions. Reference

Introduction to Physiological Psychology PSB3002 Spring Semester 2014

Basic info Course: CS 165 Accelerated Introduction to Computer Science Credits: 8 Instructor: Tim Alcon timothy.alcon@oregonstate.

Problem 1. CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class

MKTG3000: Mobile Marketing and Analytics

Introduction to Business Course Syllabus. Dr. Michelle Choate Office # C221 Phone: Mobile Office:

Part I. Multiple Choice Questions (2 points each):

Marketing for Hospitality and Tourism Course Syllabus. Dr. Michelle Choate Office # C221 Phone: Mobile Office:

Department of Political Science The University of Oklahoma

ISM and 05D, Online Class Business Processes and Information Technology SYLLABUS Fall 2015

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

DEPARTMENT OF INFORMATION SCIENCE. INFO221 Application Software Development COURSE OUTLINE

SI 539, Winter 2014 Complex Web Design

The course assumes successful completion of CSCI E-50a and CSCI E-50b, i.e. at least two semesters of programming, with a grade of C- or better.

SE 333/433 Software Testing and Quality Assurance

ISM 4113: SYSTEMS ANALYSIS & DESIGN

CJK505 SUMMER 2015 JUVENILE JUSTICE

Software Development Foundations CPSC Spring 2014 Syllabus

Syllabus for CS 134 Java Programming

MIS W: Mobile Business

The University of North Carolina at Greensboro CRS 605: Research Methodology in Consumer, Apparel, and Retail Studies (3 Credits) Spring 2014

MSSE 501 Inquiry Through Science & Engineering Practices

SYLLABUS CIS 3660: OBJECT-ORIENTED SYSTEM ANALYSIS AND DESIGN SPRING 2010

Finance 471: DERIVATIVE SECURITIES Fall 2015 Prof. Liang Ma University of South Carolina, Moore School of Business

UNIVERSITY OF LETHBRIDGE FACULTY OF MANAGEMENT. Management Contemporary Database Applications (Using Access)

Moving from CS 61A Scheme to CS 61B Java

Software Engineering (CS550)

George Washington University Department of Psychology PSYC 001: General Psychology

GEOL 101: Introduction to Geology

Scenario: Optimization of Conference Schedule.

Java Application Developer Certificate Program Competencies

Major Topics Covered in the Course

GEOL 107/L: Geology Goes Hollywood Spring 2014

The world is a complex place, and. requires that we learn how to. imagine its full potential.

3rd Edition, June standards/ecma-334.htm.

Industrial and Organizational Psychology Psychology 330

Office Hours: Tuesdays and Thursdays, 9:30am 10:30am Tuesdays Noon-1:00pm Thursdays Noon-1:00pm by appointment only Room J-324

Psychology 261, Winter 2013 Physiological Psychology

CS 476 / CIS 676: Software Engineering II / Project Management

AP Computer Science A 2010 Scoring Guidelines

INTERCULTURAL COMMUNICATION COM3461

Exercise 1: Python Language Basics

CS 115 Introduction to Computer Programming Course Syllabus (Night Sections) Fall 2015

Project 2: Bejeweled

J a v a Quiz (Unit 3, Test 0 Practice)

Programming Exercise 3: Multi-class Classification and Neural Networks

Chulalongkorn University International School of Engineering Department of Computer Engineering Computer Programming Lab.

Using MyMathLab. Features

MIS W: Mobile Business

University of Waterloo Department of Psychology Psychology 101, Sec. 02 Introduction to Psychology Winter :30 9:50 M3 1006

GET 114 Computer Programming Course Outline. Contact: Office Hours: TBD (or by appointment)

Programming Languages

Transcription:

Introduction to Computer Programming (CS 1323) Project 9 Instructor: Andrew H. Fagg November 30, 2014 Introduction Inproject6, wedevelopedasimplemodelofamarkovchain. Inthisproject, wewilldevelop an object-based implementation that will allow multiple probabilistic transitions from any given state. For example, we might want to represent the following Markov Chain model of Oklahoma weather and OU weather policy: p=0.4 p=0.2 No Classes Precipitation Cancelled p=0.4 p=0.5 p=0.4 From the state, we transition to the state with probability p = 0.4 and to the state with probability p = 0.4 (and stay in this state with probability p = 0.2). Likewise, from the state, we can transition to either the or Classes Cancelled states. Objectives By the end of this project, you will be able to: 1. augment existing code to solve a problem, 2. implement parts of a class, and 1

3. write a loop that iterates until appropriate criteria are met. State Class State.java contains a partial implementation of the State class. Each state will contain the following information: The name of state (a String) A list of transition probabilities (an ArrayList) A list of cumulative probabilities (an ArrayList) A list of next states (an ArrayList) A terminal flag (a boolean) The implementation of each of these instance variables is provided in the java file. Each ArrayList has one element for each transition that we will represent. Entryiofthecumulativeprobabilityarraywillalwaysbethesumofprobabilities0,1,...,i (your code will need to enforce this). Project Requirements 1. Import State.java into your Eclipse environment. This can be found in the projects section of the class web page. 2. Complete the implementation of the State() constructor. 3. Provide an implementation of addtransition(). 4. Complete the implementation of nextstate(). 5. Copy your implementation of getnonnegativeint() from project 7. 6. In main(): add code that implements the state transitions and terminals for the above Markov Chain. 7. In main(): add the implementation for traversing the Markov Chain starting from s0. 2

Examples Here are some example inputs and corresponding outputs from a properly executing program. You should carefully consider the cases with which you test your program. In particular, think about the key boundary cases (the cases that cause your code to do one thing or another, based on very small differences in input). User inputs are shown in bold. Example 1 : : : 0.5 0.5 0.4 0.4 0.4 0.8 0.2 0.2 0.4 0.6000000000000001 Classes Cancelled Classes Cancelled (Terminal): NO TRANSITIONS ###################### Enter a seed: 2 3

Classes Cancelled (program ends) Example 2 : : : 0.5 0.5 0.4 0.4 0.4 0.8 0.2 0.2 0.4 0.6000000000000001 Classes Cancelled Classes Cancelled (Terminal): NO TRANSITIONS ###################### Enter a seed: done Enter a seed: -5 Only non-negative values are allowed: done Enter a seed: 4 4

Classes Cancelled (program ends) 5

Project Documentation Follow the same documentation procedures as we used in project 1. In particular, you must include: Java source file documentation (top of file) Method-level documentation Inline documentation For full credit, you must execute Javadoc on your source file and include the results (in the doc directory) in your zip file. Hints In project 6, we had one probabilistic transition to consider at most for each state. Our code decided to perform a transition using logic such as this: double value = random. nextdouble() ; if (value < p) do_transition () ; Here, if 0 value < p, then the transition is performed. When we have multiple transitions to consider, we will still use a single sample (the value) from the random object. For multiple transitions (with probabilities p 0,p 1,...p n 1 ), the transition to the k th state in the list will happen if: p 0 +p 1 +...+p k 1 value < p 0 +p 1 +...+p k Think about how this relates to your cumulativeprobabity instance variable. Project Submission This project must be submitted no later than 2:00pm on Tuesday, December 2nd to the project 9 D2L dropbox. The file must be called Project9.zip and be generated in the same way as for prior projects. 6

Code Review For the office hour sessions surrounding the project deadline, we will put together a Doodle Poll through which you can sign up for a 5-minute code review appointment. During this review, we will execute test examples and review the code with you. If you fail to show up for your reserved time, then you will forfeit your appointment and you must attend at a later time that is not already reserved by someone else. If either the instructor or TA are free during office hours (or another mutually-agreed upon time), then we are happy to do code reviews, as well as provide general help. We will only perform reviews on code that has already been submitted to the dropbox on D2L. Please prepare ahead of time for your code review by performing this submission step. Code reviews must be completed no later than Tuesday, December 9th. If you fail to do a code review, then you will receive a score of zero for the project. Anyone receiving a 90 or greater on Project 7 may opt to do an offline code review (which does not require your presence). Send the instructor email once you have submitted your project in order to schedule an offline review. 7

Rubric The project will be graded out of 100 points. The distribution is as follows: Implementation: 35 points Program formatting: 15 points (15) The program is properly formatted (including indentation, curly brace and semicolon locations). (8) There is one problem with program formatting. (0) The program is not properly formatted. Data types and method calls: 10 points (10) The program is using proper data types and method calls. (5) There is one error in data type or method call selection. (0) There are multiple errors in data type and method call selection. Required Methods: 10 points (10) All of the required methods are implemented correctly. (0) The required methods are not implemented correctly. Proper Execution: 30 points Output: 15 points (15) The program passes all tests. (12) The program fails one test. (9) The program fails two tests. (6) The program fails three tests. (3) The program fails four tests. (0) The program fails five or more tests. Execution: 15 points (15) The program executes with no errors (thrown exceptions). (8) The program executes, but there is one minor error. (0) The program does not execute. 8

Documentation and Submission: 35 points Project Documentation: 5 points (5) The java file contains all of the required documentation elements at the top of the file. (3) The java file is missing one of the required documentation elements. (2) The java file is missing two of the required documentation elements. (0) The java file is missing more than two of the required documentation elements. Method-Level Documentation: 10 points (10) Every method contains all of the required documentation elements ahead of the method prototype, and the Javadocs have been generated and included in the submission. (7) The method documentation is missing one of the required documentation elements. (3) The method documentation is missing two of the required documentation elements, or the Javadocs have not been submitted. (0) The method documentation is missing more than two of the required documentation elements. Inline: 10 points (10) Every method contains appropriate inline documentation. (7) There is one missing or incorrect line of inline documentation. (3) There are two missing or incorrect lines of inline documentation. (0) There are more than two missing or incorrect lines of inline documentation. Submission: 10 points (10) The correct zip file name is used. (0) An incorrect zip file name is used. Bonus: 6 points For each unique and meaningful error in this project description that is reported to the instructor, a student will receive an extra two points. 9