UIL Computer Science Concepts. Hands On Element - The First Steps

Similar documents
Planet Club. Version AUG-2005

Thank you for your purchase!

Developed and Published by. AIMS Education Foundation

Soaring Through the Universe

Planets Clues. Webaddress for this activity is:

THE SOLAR SYSTEM. Ringers. The Multi Taskin Mom

T H E R O C K W E L L A D V E N T U R E S S O L A R S Y S T E M E X P E D I T I O N Second Edition: Academic Year

What's Up In Space? In the Center. Around the Sun. Around Earth. Space Facts! Places in Space

ISP 205: Visions of the Universe. Your Professor. Assignments. Course Resources

ì<(sk$m)=bdcdhj< +^-Ä-U-Ä-U

Science Trail 2010: By: Megan Bucher & Allison Gallahan. Name:

ASTR 4 Solar System Astronom y

Quiz and Scavenger Hunt

The Solar System by Edward P. Ortleb and Richard Cadice

Astronomy 110 Section 1 2 / 01/ Extra Credit

UniServe Science Timelines in the Science Curriculum Kaye Placing, UniServe Science

ì<(sk$m)=bdhgea< +^-Ä-U-Ä-U

Name: Pd Parent Signature of completion:

Planets and Moons. unit overview

Class: 6 Science Date: 1/30/13 Solar System Simulator + Guide

Large and small planets

Astronomy 1010: Survey of Astronomy. University of Toledo Department of Physics and Astronomy

TEACHER NOTES MIDDLE GRADES SCIENCE NSPIRED

Simulating the Solar System

Planets Pathfinder. Print Resources:

Sensational Solar System

GEMS Student Activity

8 th Grade Intensive Math

Interpret Astrology The House Combinations. By Michael Erlewine

Distance From the Sun

Grades 2-7. Exploring Creation with Astronomy 2 nd Edition Lapbook. Sample Page. A Journey Through Learning

Summative Assessment #2 for Outer Space and Cyber Space

Drexel-SDP GK-12 ACTIVITY

RETROGRADE MOTION AND PLANETARY ORBITS Computer Simulations

Grades 1-6. Exploring Astronomy. Learning Lapbook with Study Guide. Sample Page. A Journey Through Learning

Unit Topic: This is the Solar System Unit 18 Grade Band: Middle School Unit Target: Earth Science Lesson 1

Lab 1. Moon Phases: Why Does the Appearance of the Moon Change Over Time in a Predictable Pattern?

Learning About Our Solar System

Just How Big Is Our Solar System?

Student Workbook for Physics for Scientists and Engineers: A Strategic Approach with Modern Physics Randall D. Knight Third Edition

Solar System. Reading Passages Included. Created By: The Owl Teacher

Investigating the Solar System

Unit: Planetary Science

SUN FACTS AND STATS. Section 1: Some Interesting Facts about the Sun 1. What elements make up the Sun?

Astronomy Test Review. 3 rd Grade

Teacher s Guide For. Core Meteorology: Atmosphere

1 THE SOLAR SYSTEM. six

Holt Earth Science Planets Of Solar System

Astronomy 001 Online SP16 Syllabus (Section 8187)

The following data for the Sun and the four inner planets of the Solar System have been observed. Diameter (kilometers)

8 Books, Our Solar System, Pluto, Earth, Jupiter, Saturn, Mars, Mercury, Uranus, Venus And Neptune By Christine Taylor-Butler READ ONLINE

Lesson 1 The Structure of the Solar System

Scientific Notation and Scaled Models

Lab Activity: The Central Limit Theorem

Teacher Name: John Borud District: Montello Class / Subject / Grade:

Middle grade students are the intended audience; however, portions of the lesson may be

Dear Teacher, Overview Page 1

STUDENT INFORMATION PLAN (SIP) DEVELOPMENTAL MATHEMATICS MATH 0310 BEGINNING ALGEBRA - TDCJ

DOWNLOAD OR READ : THE AMERICAN EPHEMERIS FOR THE 21ST CENTURY AT MIDNIGHT PDF EBOOK EPUB MOBI

Solar SyStem. by Norma o toole

Cycles. 1. Explain what the picture to the left shows. 2. Explain what the picture to the right shows. 3. Explain what the picture to the left shows.

Cargo Specialist. Handout #1: Food. Planet Team: Jupiter Saturn Uranus Neptune Pluto (circle one) Travel Time

PHYS133 Lab 2 Scale Model of the Solar System

Thank you for purchasing an Evan-Moor e-book!

ON SITE SYSTEMS Chemical Safety Assistant

Curriculum-Based Hands-On Activities. Investigating SCIENCE

Jotiz Mobile. November m.jotiz.com. Free Jyotish Software for Astrologers and Amateurs. Free Jyotish Software for Astrologers and Amateurs

Total Points 50. Project grade 50

Color-by- Number 2015 Science Teaching Junkie, Inc.

Courtesy of NASA nasaimages.org. Copyright 2011, 2013 Gravitas Publications, Inc.

Diagnostic Series XX/vii/MMXVII Version 2

NASA The planets in our solar system are all different sizes.

PP

Courtesy of NASA nasaimages.org

Astronomy The Solar System Spring 2015

Introductory Statistics Neil A. Weiss Ninth Edition

AST 2010 Syllabus Winter 2018

Making Science Graphs and Interpreting Data

Elementary Statistics in Social Research Essentials Jack Levin James Alan Fox Third Edition

Solar System Scoot. At the end of the game, collect all of the question cards and review the answers with the class.

Analyst Software. Peptide and Protein Quantitation Tutorial

Introductory Geosciences I: Geology 1121 Honors Earth s Internal Processes Georgia State University Fall Semester 2009

ASTRONOMY. Upon successful completion of the course, the student will be able to:

READY-TO-USE LESSON PLANS. Meet the Planets

AP Calculus. Analyzing a Function Based on its Derivatives

Eureka Math. Grade 8 Module 1 Student File_B. Student Workbook

Student Technology Standards Scope and Sequence

The Planets and Scale

ASTROMATH 101: BEGINNING MATHEMATICS IN ASTRONOMY

COURSE SYLLABUS AND INSTRUCTOR PLAN GENERAL INORGANIC CHEMISTRY I CHEM Dr. Vanessa Castleberry

Science Lesson Plans Fourth Grade Curriculum Total Activities: 115

Possession of this publication in print format does not entitle users to convert this publication, or any portion of it, into electronic format.

User Guide. Affirmatively Furthering Fair Housing Data and Mapping Tool. U.S. Department of Housing and Urban Development

Sample Pages. Free Newsletter Sign up Today! Learn Through Experience

IN CLASS. Grading Summary: Question 1: 22 points. Question 2: 16 points. Question 3: 16 points. Question 4: 30 points. Question 5: 16 points

Orbital Paths. the Solar System

Lecture #19 MINEQL: Intro & Tutorial Benjamin; Chapter 6

MESSAGES IN SPACE. Overview. Standards. Objectives

3D SOLAR SYSTEM VISUALIZATION WITH OpenGL

TEKS Cluster: Space. identify and compare the physical characteristics of the Sun, Earth, and Moon

Transcription:

UIL Computer Science Concepts Hands On Element - The First Steps Written by Kirby Rankin Edited by Linda Tarrant and Nancy Barnard Author Kirby Rankin brings over 25 years of teaching experience and has coached Computer Science for most of those years. His successes include three individual champions and six 2A team champions, and these were in a row from 2008 through 2013. He had many, many more competitors qualify for region and state during his years teaching. We are a small company that listens! If you have any questions or if there is an area that you would like fully explored, let us hear from you. We hope you enjoy this product and stay in contact with us throughout your academic journey. Linda Tarrant, President Hexco Inc. HEXCO ACADEMIC www.hexco.com P.O. Box 199 Hunt, Texas 78024 Phone: 800.391.2891 Fax: 830.367.3824 Email: hexco@hexco.com Copyright 2016 by Hexco Academic. All rights reserved. Reproduction or translation of any part of this work beyond that permitted by Section 107 or 108 of the 1976 United States Copyright Act without the permission of the copyright owner is unlawful. The purchaser of this product is responsible for adhering to this law which prohibits the sharing or reselling of copyrighted material with anyone. This precludes sharing with coaches or students from other schools via mail, fax, email, or simply passing along. Hexco materials may not be posted online. Exception/permission for photocopies granted by Hexco Academic is only applicable for Practice Packets, which may be copied expressly for the purchaser s group or classroom at the same physical location. If you like this product, we also recommend, Computer Science Concepts The First 15

Introduction There are two parts to the UIL Computer Science contest. There is a written exam that contains forty multiple choice and free response questions and a set of twelve programming problems for each team to attempt to code. This guide is intended to get contestants prepared to participate in the programming portion of the contest. While it is possible to read this guide and get a partial understanding of Java programming in general, it will greatly enhance your understanding to be enrolled in a high school computer science course of some kind. Also, reading and thoroughly studying the Hexco guide titled UIL Computer Science The First Fifteen will improve your chances of being successful during the programming portion of the contest. There are two goals for this guide. First, to get teams prepared to participate. That is, how to show up at a contest with the proper equipment, software and a basic knowledge of how the contest will be run as well as what to expect and how to deal with it. The second goal is to provide teams with enough programming examples to successfully code the easier two or three problems in the problem set. While it may not seem to be very competitive to solve only two or three problems in a twelve-problem set, consider the statistics presented in this table from 2015 UIL Computer Science district contests. Percent of district Computer Science contests where a team score of 270 or above would have earned a team medal (3 rd place or better). Classification Percent 1A 100% 2A 100% 3A 100% 4A 88% 5A 72% 6A 34% Given that one half of a team s score comes from the top three individual scores on the written portion of the test and that each of those scores could be as high as 240 points, it becomes very clear that successfully completing just a few of the programs can lead to great success at the district level. Of course, to be competitive at the region and state level teams will have to score many more than 270 points. We will leave that level of expertise for another guide. This guide is all about getting off to a good start. Here we go! 2016 HEXCO ACADEMIC PO Box 199 Hunt, TX 78024 800-391-2891 Do not copy, scan, post to web, or share electronically. 2

Table of Contents Introduction... 2 Rules and Procedures (or What's Going On?!)... 6 Run sheet.... 7 Hardware and Software... 9 Hardware... 9 Software... 9 Java SDK... 9 IDE... 11 New Java Project... 14 New Java Class... 16 PC 2... 20 The Problem Set (Aka The Packet )... 21 Team Strategy... 21 Student and Judges Data Files... 22 Problem Solving Strategies... 22 Completed Examples... 24 Dry Run Problem... 24 Twelve Problems... 27 1. Goofy... 27 2. Grades... 29 3. Text Work... 32 Sample Problems... 36 4. Quadratic... 36 5. Toggle... 37 6. Case... 38 7. Index... 39 8. Code... 41 9. Parking... 42 10. Bullseye... 44 11. Planetary Travel... 45 2016 HEXCO ACADEMIC PO Box 199 Hunt, TX 78024 800-391-2891 Do not copy, scan, post to web, or share electronically. 4

12. Clean Up Those Numbers... 46 Solutions and Explanations of the Sample Problems... 48 4. Quadratic... 48 5. Toggle... 49 6. Case... 51 7. Index... 53 8. Code... 54 9. Parking... 55 10. Bullseye... 57 11. Planetary Travel... 58 12. Clean Up Those Numbers... 59 Index....61 2016 HEXCO ACADEMIC PO Box 199 Hunt, TX 78024 800-391-2891 Do not copy, scan, post to web, or share electronically. 5

After you have created a Workspace, Eclipse will take you to the Welcome Screen. You may explore the samples or tutorials, if you like, but when you are ready to write some Java code, click on Workbench. After you click on Workbench, you will get to the Eclipse IDE workspace. This includes a title bar, menu, a toolbar and several windows. Not all of the windows are crucial for UIL competition. 2016 HEXCO ACADEMIC PO Box 199 Hunt, TX 78024 800-391-2891 Do not copy, scan, post to web, or share electronically. 13

A shot is considered a bullseye if the bullet strikes any part of the circular bullseye. The center of the bullseye and thus the center of the target is located at 0.0, 0.0. Example Input File 5 1.5 0.3 0.1 0.3 0.0 0.0 2.5 3.8 0.0 0.5 Example Output to Screen Miss Bullseye Bullseye Miss Bullseye 11. Planetary Travel Program Name: Planets.java Input File: planets.dat It is the year 3016 and space travel has become a reality. The largest passenger space travel company is SpaceTrekker. At SpaceTrekker you can purchase a ticket to travel between any one of the eight planets and Pluto. To calculate the fare between each planet SpaceTrekker needs to know the distance between each planet. Write a program that will do that calculation for them. Input The file will begin with nine (9) lines each containing the name of a planet (and Pluto) and its distance from the sun in kilometers. These nine lines will be followed by a number t representing the number of trips taken between planets. Each of the t lines will contain the names of the departure planet and the destination planet separated by one space. Output Your program should print the planet of departure and the destination planet separated by a space and followed by a space then the distance in kilometers travelled on each trip between planets followed by a space, the units of measure (kilometers) and a period. 2016 HEXCO ACADEMIC PO Box 199 Hunt, TX 78024 800-391-2891 Do not copy, scan, post to web, or share electronically. 45

Constraints 1 <= t <= 20 Example Input File Mercury 57910000 Venus 108200000 Earth 149600000 Mars 227940000 Jupiter 778330000 Saturn 1424600000 Uranus 2873550000 Neptune 4501000000 Pluto 5945900000 5 Mars Earth Earth Uranus Neptune Mercury Jupiter Saturn Mercury Pluto Example Output to Screen Mars to Earth is 78340000 kilometers. Earth to Uranus is 2723950000 kilometers. Neptune to Mercury is 4443090000 kilometers. Jupiter to Saturn is 646270000 kilometers. Mercury to Pluto is 5887990000 kilometers. 12. Clean Up Those Numbers Program Name: Phone.java Input File: phone.dat PhoneBooksRUs Inc. needs to clean up a list of phone numbers that they have stored in a file. The numbers are listed in a variety of formats and some of the numbers in the file are not valid phone numbers. Your job is to write a program to read the phone numbers and then print a list of the valid numbers in the proper format. Input The file will contain an unknown number of possible phone numbers, each on a separate line. A valid phone number entry will have one of the following formats: 2016 HEXCO ACADEMIC PO Box 199 Hunt, TX 78024 800-391-2891 Do not copy, scan, post to web, or share electronically. 46