Homework : Roach Population Ver Last Updated: 2/10/2017 1:14 PM

Similar documents
Survey of Pastors. Source of Data in This Report

Introduction to Statistical Hypothesis Testing Prof. Arun K Tangirala Department of Chemical Engineering Indian Institute of Technology, Madras

September 11, 1998 N.G.I.S.C. New Orleans Meeting. Within the next 15 minutes I will. make a comprehensive summary of dozens and dozens of research

August Parish Life Survey. Saint Benedict Parish Johnstown, Pennsylvania

January Parish Life Survey. Saint Paul Parish Macomb, Illinois

Excel Lesson 3 page 1 April 15

Survey of Teens and. Source of Data in This Report

Survey Report New Hope Church: Attitudes and Opinions of the People in the Pews

What happened to the Christians of Andhra Pradesh

Pastor Views on Tithing. Survey of Protestant Pastors

Summary of Research about Denominational Structure in the North American Division of the Seventh-day Adventist Church

Chapter 20 Testing Hypotheses for Proportions

Annual Assessment and Action Plan

Torah Code Cluster Probabilities

Frequently Asked Questions about ALEKS at the University of Washington

Results from the Johns Hopkins Faculty Survey. A Report to the Johns Hopkins Committee on Faculty Development and Gender Dr. Cynthia Wolberger, Chair

The changing religious profile of Asia: Buddhists, Hindus and Chinese Religionists

Westminster Presbyterian Church Discernment Process TEAM B

Northshore Probe 2011: Summary By Lane Corley

The City School Syllabus Outline for Parents Class 6

Pastors Views on the Economy s Impact Survey of Protestant Pastors

Christians Say They Do Best At Relationships, Worst In Bible Knowledge

Grade 6 correlated to Illinois Learning Standards for Mathematics

for E XCELLENCE Evaluation Worksheets Your Snapshots The Kingdom Perspective

CONGREGATION SELF STUDY

The Fifth National Survey of Religion and Politics: A Baseline for the 2008 Presidential Election. John C. Green

6.00 Introduction to Computer Science and Programming, Fall 2008

Knights of Columbus-Marist Poll January 2011

Final Exam (PRACTICE-2) #2

THE CATHOLIC CHURCH IN CRISIS New Jersey Residents Blame Church Leaders

REQUIRED DOCUMENT FROM HIRING UNIT

12 Keys Evaluation Guide

Studying Religion-Associated Variations in Physicians Clinical Decisions: Theoretical Rationale and Methodological Roadmap

Center for Applied Research in the Apostolate

Journal of Religion & Film

April Parish Life Survey. Saint Elizabeth Ann Seton Parish Las Vegas, Nevada

A study on the changing population structure in Nagaland

Changes in Demand for Food Assistance at New York City Emergency Food Programs After September 11, 2001

=EQUALS= Center for. A Club of Investigation and Discovery. Published by: autosocratic PRESS Copyright 2011 Michael Lee Round

Studies of Religion I & II Assessment Task Notification

Taiwan Church Growth Report Prepared for the 150 th Anniversary of Protestant Missionaries Coming to the Island

Congregational Survey Results 2016

The Sunday School Growth Evaluation Plan

G L O R I F Y G O D B Y C O N N E C T I N G H E A R T S T O C H R I S T

INSTRUCTIONS FOR SESSION ANNUAL STATISTICAL REPORT

DEMOLITION OF THE FAITH I: The Lost Identity Of Catholicism

NPTEL NPTEL ONLINE COURSES REINFORCEMENT LEARNING. UCB1 Explanation (UCB1)

Transition Summary and Vital Leader Profile. The Church Assessment Tool 5/3/16

The Issue of Scripture Availability and Use Within A Ta Ethne Ethnolinguistic People Group Focus. A Hierarchy of Scriptural Availability and Use

Thanks! Thanks for joining us for an informative seminar on Building Your Vibrant Parish.

Conversations Sample Report

Review for Test III #1

WALKING IN THE FAVOUR OF GOD

Proverbs 29:18 Copyright

Opinions about the Latin Mass have shifted over time A Majority of adult Catholics express no opinion on return of older liturgy

Nassau BOCES IDW User Group Meeting January 15, 2013

Is there a demographic component of the proxy war in the Kashmir Valley?

IT S TIME The Urgency of Urban Mission

TAUGHT BY: REV. CHARLES EDWARD CLARK, JR., DMIN

ITU Kaleidoscope 2016 ICTs for a Sustainable World

Studying Adaptive Learning Efficacy using Propensity Score Matching

The following content is provided under a Creative Commons license. Your support

175 Chapter CHAPTER 23: Probability

CHAPTER 17: UNCERTAINTY AND RANDOM: WHEN IS CONCLUSION JUSTIFIED?

The numbers of single adults practising Christian worship

MISSOURI S FRAMEWORK FOR CURRICULAR DEVELOPMENT IN MATH TOPIC I: PROBLEM SOLVING

HISTORY & GEOGRAPHY 1209

Congregational Vitality Survey

Lab 5 GEO 302C Name: Background information: The Gaia theory - Daisyworld

Communications Plan: St. James Episcopal Church, Piqua, Ohio

1 Introduction. Cambridge University Press Epistemic Game Theory: Reasoning and Choice Andrés Perea Excerpt More information

Pastors Views on Immigration. Survey of American Protestant Pastors

Protestant Pastors Views on the Economy. Survey of 1,000 Protestant Pastors

MISSIONAL LEADERSHIP DEPLOYMENT 2020

CONGREGATION B NAI JEHOSHUA BETH ELOHIM Affiliated with The Union for Reform Judaism

Review Deductive Logic. Wk2 Day 2. Critical Thinking Ninjas! Steps: 1.Rephrase as a syllogism. 2.Choose your weapon

Church Governance for the Future Committee on Church Governance Background

OVERVIEW & GOAL CONTENTS NUMBER OF PLAYERS BOARD PROVINCES FLEETS

Religio. State of Catholicism. Introduction Report

Owen Sound Seventh-day Adventist Church Survey

THE DIOCESE OF SAN DIEGO MISSION PLAN. Implementation of our Baptismal Covenant.

GMAT. Verbal Section Test [CRITICAL REASONING] - Solutions. 2019, BYJU'S. All Rights Reserved.

REACH UP TO GOD. engaging in daily bible study networks for daily Bible reading and study.

ofile Regional h Li Archdiocese of Sydney National Church Life Survey 2006 NCLS Code: TAS00000 Denomination: The Catholic Church in Australia

Good morning, good to see so many folks here. It's quite encouraging and I commend you for being here. I thank you, Ann Robbins, for putting this

St. Luke s New Rector Search Process Parish Survey Results. Parish Meeting August 21, 2016

Number of Jews in the world with emphasis on the United States and Israel

Six Sigma Prof. Dr. T. P. Bagchi Department of Management Indian Institute of Technology, Kharagpur

reach the world equipping servant leaders OUR MISSION COVENANT The Kentucky Annual Conference of the United Methodist Church

Breakout Session 1A Using a Social Service Referral Tool to Improve Patient Care Erine Gray

Tuen Mun Ling Liang Church

INFORMATION FOR DVC MATH STUDENTS in Math 75, 110, 120, 121, 124 and 135 Distance Education Hours by Arrangement (HBA) - Summer 2010

May Parish Life Survey. St. Mary of the Knobs Floyds Knobs, Indiana

Dick Hardy. Hospitality. Make It Happen. 9 Aspects of Over-the-Top Guest Hospitality. Coaching Guide THE HARDY GROUP

INSTRUCTIONS FOR SESSION ANNUAL STATISTICAL REPORT

B29. Ascension Day Luke 24:44-53; Mark 16:15-20; Acts 1:9-11

Dome and Spire Frequently Asked Questions July 2016

Mission Shares Part of Our United Methodist Covenant ***

This report is organized in four sections. The first section discusses the sample design. The next

Sacred Heart Church Austin, Texas. Stewardship Campaign. You Can Count on Me! Puedes Contar Conmigo! Implementation Phase Program for six weeks

Transcription:

* Dynamic Memory *Big O Notation*Stacks *Extreme Programming*Selection Sort*Insertion Sort*Waterfall Model Homework : Roach Population Ver 3.14159 Last Updated: /10/017 1:14 PM Implement a class RoachPopulation that simulates the growth of a roach population. The constructor takes the size of the initial roach population. The wait method simulates a period in which the population doubles. The spray method simulates spraying with insecticide, which reduces the population according to a certain percentage. The getroaches method returns the current number of roaches. The tostring method displays the roaches according to a graphical (console) format below. The RoachTester class should create a RoachPopulation object and use a menu to display and manipulate the object. Your Roach Population should; Allow the tester class to pass in an initial population size Have a waittime() method that will double the population of roaches Have a spray method that will; String*Arrays*ArrayList*Client Server*Artificial Intelligence*Inheritance*Files*Video Games*Short circuit evaluation* 1

kill between 10-50% of the roaches the first time. Each subsequent call will kill by a reduction of % (out of 100 for Jerry Qu) NOTE: Can be 0 but NOT negative. For example, a population of 100. spray(), 1 st time generates kill ratio between 10% and 50% inclusive (41 values or can use continuous real numbers to span the 41 values) Let s say it generates 1% to kill 100 *.1 = 1 so 1 die. I would like this returned from the spray method Round up for.5 or over on kills. Example, 79 population *.6 percent kills = 0.54 so 1 roaches are killed Round down if less than.5 A tosring method that returns a String that has one @ for each roach. There should only by 0 per line, EVERY 100 ROACHES TRO IN A DIVIDING LINE CONSISTING OF DASHES NOTE: NO DASHES FOR ONLY 100 ROACHES!!!

Example for 04 -------------------- -------------------- @@@@ Use \n to append to the String You need a Tester class It should ; have a main and a Scanner Ask the user for the number of initial population Then give a menu where you; display the number of roaches numerically and graphically ask them to 1. wait. spray 3. end 3

Here is an example run through run: Welcome to the Roach Population Simulation How many roaches to start? 100 Current Population -> 100 = Spray (attempts to kill) 1 Current Population -> 00 -------------------- = Spray (attempts to kill) --->Kill Percent from 10 to 50<--- %%% KP Selected = 0.0% out of 00:Population **** 40 killed ********* 4

Current Population -> 160 -------------------- = Spray (attempts to kill) --->Kill Percent from 8 to 48<--- %%% KP Selected = 8.0% out of 160:Population **** 45 killed ********* Current Population -> 115 @@ = Spray (attempts to kill) --->Kill Percent from 6 to 46<--- %%% KP Selected = 33.0% out of 115:Population **** 38 killed ********* Current Population -> 77 5

@@@@ = Spray (attempts to kill) --->Kill Percent from 4 to 44<--- %%% KP Selected = 5.0% out of 77:Population **** 19 killed ********* Current Population -> 58 @@@@@ = Spray (attempts to kill) 1 Current Population -> 116 @@@ = Spray (attempts to kill) 1 Current Population -> 3 -------------------- 6

@@@@@@@@@@@@ = Spray (attempts to kill) --->Kill Percent from to 4<--- %%% KP Selected = 8.0% out of 3:Population **** 19 killed ********* Current Population -> 13 -------------------- = Spray (attempts to kill) --->Kill Percent from 0 to 40<--- %%% KP Selected = 40.0% out of 13:Population **** 85 killed ********* Current Population -> 18 7

@@@@@@@@ = Spray (attempts to kill) --->Kill Percent from 0 to 38<--- %%% KP Selected = 7.0% out of 18:Population **** 35 killed ********* Current Population -> 93 = Spray (attempts to kill) --->Kill Percent from 0 to 36<--- %%% KP Selected = 5.0% out of 93:Population **** 5 killed ********* Current Population -> 88 @@@@@@@@ = Spray (attempts to kill) 8

--->Kill Percent from 0 to 34<--- %%% KP Selected = 3.0% out of 88:Population **** 0 killed ********* Current Population -> 68 @@@@@@@@ = Spray (attempts to kill) --->Kill Percent from 0 to 3<--- %%% KP Selected =.0% out of 68:Population **** 1 killed ********* Current Population -> 67 @@@@@@@ = Spray (attempts to kill) --->Kill Percent from 0 to 30<--- %%% KP Selected = 5.0% out of 67:Population **** 17 killed ********* Current Population -> 50 @@@@@@@@@@ 9

= Spray (attempts to kill) --->Kill Percent from 0 to 8<--- %%% KP Selected = 8.0% out of 50:Population **** 4 killed ********* Current Population -> 46 @@@@@@ = Spray (attempts to kill) --->Kill Percent from 0 to 6<--- %%% KP Selected = 19.0% out of 46:Population **** 9 killed ********* Current Population -> 37 @@@@ = Spray (attempts to kill) --->Kill Percent from 0 to 4<--- %%% KP Selected = 19.0% out of 37:Population **** 7 killed ********* Current Population -> 30 @@@@@@@@@@ 10

= Spray (attempts to kill) --->Kill Percent from 0 to <--- %%% KP Selected =.0% out of 30:Population **** 7 killed ********* Current Population -> 3 @@@ = Spray (attempts to kill) 0 [{ }] [{ }] [{ }] [{ }] [{ }] [{ }] [}}}}[{ }]{{{{] [{ }] [{ }] /\[{ }]/\ (/;-;\) '-) (-' ------------------------------------------ --------------------------- ( ) Mr. Yoshikawasaki does not really welcome you to his loop practice... ) ( However you may use it if Mr. Yoshikawasaki can get a cookie xd ( ) ------------------------------------------ --------------------------- (\.) (./) Type 1 for Part 1 \\( )// Type for Part (\_(\ /. ]-[.\ /)_/) Type 3 for 500 Asteriks ) ( `Yoshikawasaki `) ( Type 4 for number to asteriks //'''''''//''''''[- ^ -]''''''\\'''''''\\ Type 5 for odd numbers \\...\)...] [...(/...// Type 6 for average of numbers part 6 11

\)] [(/ Type 7 for dispauthor() method \_ _/ Type 8 for random sound player [ \_/ ] Type 9 for probability dice roll [ [;] ] [ ;;; ] ;;;;;] ] ;;;;; ] ]- ;;;;;[ ] ]-- ;;;;; [ ] ]--- ;;;;;[ [ ] ] --- ;;;;;[ [ ] ] --- ;;;;[ [ ] /---/ ;;;[ [ ]/---/ ;;[ [ /---/ ;[ [/---/ [ /---/ [/---/] /---/ ] /---/] ]; /---/ ] ];; /---/[ ] ];;; /---/ [ ] ];;;; --- [ [ ] ];;;;; --- [ [ ] ];;;;; ---[ [ ] ;;;;; --[ [ ];;;;; -[ [ ;;;;; [ [;;;;; [ ;;;;; [;;;;;] ;;;;; ] ;;;;;] ] ;;;;; ] ]- ;;;; [ ] ]-- ;;;; [ ] ]-- ;;[ [ ] ]-/ ;[ [ ] ]/ [ [ ] ] \\ // \ / V Current Population -> 3 @@@ 1

= Spray (attempts to kill) --->Kill Percent from 0 to 0<--- %%% KP Selected = 3.0% out of 3:Population **** 1 killed ********* Current Population -> @@ = Spray (attempts to kill) --->Kill Percent from 0 to 18<--- %%% KP Selected = 3.0% out of :Population **** 1 killed ********* Current Population -> 1 @ = Spray (attempts to kill) --->Kill Percent from 0 to 16<--- %%% KP Selected = 1.0% out of 1:Population **** 3 killed ********* Current Population -> 18 @@@@@ 13

= Spray (attempts to kill) --->Kill Percent from 0 to 14<--- %%% KP Selected = 13.0% out of 18:Population **** killed ********* Current Population -> 16 @@@ = Spray (attempts to kill) --->Kill Percent from 0 to 1<--- %%% KP Selected =.0% out of 16:Population **** 0 killed ********* Current Population -> 16 @@@ = Spray (attempts to kill) --->Kill Percent from 0 to 10<--- %%% KP Selected = 10.0% out of 16:Population **** killed ********* Current Population -> 14 @ = Spray (attempts to kill) 14

--->Kill Percent from 0 to 8<--- %%% KP Selected = 8.0% out of 14:Population **** 1 killed ********* Current Population -> 13 = Spray (attempts to kill) --->Kill Percent from 0 to 6<--- %%% KP Selected =.0% out of 13:Population **** 0 killed ********* Current Population -> 13 = Spray (attempts to kill) --->Kill Percent from 0 to 4<--- %%% KP Selected = 3.0% out of 13:Population **** 0 killed ********* Current Population -> 13 = Spray (attempts to kill) --->Kill Percent from 0 to <--- %%% KP Selected = 1.0% out of 13:Population **** 0 killed ********* 15

Current Population -> 13 = Spray (attempts to kill) --->Kill Percent from 0 to 0<--- %%% KP Selected = 0.0% out of 13:Population **** 0 killed ********* Current Population -> 13 = Spray (attempts to kill) **** 0 killed ********* Current Population -> 13 = Spray (attempts to kill) **** 0 killed ********* Current Population -> 13 = Spray (attempts to kill) 16

3 Project Name Class 1 Name Class Name HW Roach Population RoachPopulation RoachTester Rubric Constructor 5 Wait 5 Spray 0 Random range appropriate 10 tostring 10 TOTAL 50 *Recursion*Linear Search*Binary Search*Grid World Case Study*File Processing *nlogn*hangman* 17