TCEA Webinar Oct. 2, 2019 ======================================= ======================================= ======================================= What is a Computer Programming Contest? ======================================= ======================================= ======================================= A computer programming contest generally consists of a series of problems for students to solve in a computer programming language. Generally, Java is always offered. Some contests offer other languages, generally Python and C++. Students generally use their own computer systems and need a programming environment installed ahead of time (like the Java SDK and a Java IDE like JCreator, Netbeans, etc. Many contests use a program such as PC^2 to receive the student's programming solution. It is then graded by the computer but looked over by the persons(s) running the contest. These contests are generally 2 hours for the programming part. Most of these contests require wifi. (if they contain a programming part) Some contests are cloud based. Many contests use PC^2 (free, but generally given to you on a flash drive at the contest). https://pc2.ecs.csus.edu/pc2code.html https://pc2.ecs.csus.edu/previous.version9.download.html It can be setup with a web application in which case you don't need pc^2 installed on your computer. (My students had trouble on a mac last year with version 9.6, but we tried later with 9.4.1 and it worked fine) Some contests also offer a multiple choice test which is generally 45 minutes long. There is generally 40 questions, and often times the last 2 questions are short answer. Some contests only offer the multiple choice test. =============== =============== =============== Where and When: =============== =============== =============== TCEA ---- https://tcea.org/ Regional Contests will be held on Saturday Dec. 7th or Dec. 14th. Austin Dec. 7th (at TCEA) Houston Dec. 7th State Contest will be on Saturday, March 21st. Programming only (no multiple choice part) Joy of Tournaments ------------------ https://www.joyoftournaments.com/ These are generally events for many UIL subjects. Also, many of the computer science contests contain only the multiple choice part. UIL website ----------- https://www.uiltexas.org/academics/stem/computer-science Java Version 12.2 SDK http://store.uiltexas.org/academics/?sort=featured&page=3 This site has lots of information about UIL contests. You can also buy packets which contain the district, regional, and state contests for a specific year ($4.00). APlusCompSci (Stacey Armstrong) ------------------------------- https://www.apluscompsci.com/cs_cont_list.htm Stacey develops many of the UIL style contests that are used in the state of Texas. He also has many materials for teaching computer science! He has donated a free multiple choice test and a packet which contains a programming segment. You can buy more packets, training materials, class teaching materials (lab assignments, lecture slide shows, and more from his website). ============================== ============================== ============================== What does a Contest Look Like? ============================== ============================== ============================== TCEA Problem 2.1 High Score General Statement: Some games reward a player for achieving the highest score out of all of the players who have played it. To accomplish this, the game stores the current high score in memory. When a new game is completed, that score is compared to the current high score. If it is higher, then the game notifies the player that he or she has made a new high score. Your task is to write a program that can determine if a new score is the highest. Input: The first line of the input contains an integer n that represents the number of data collections that follow where each data collection is on a single line. Each data collection contains two integers separated by a single space. The first integer represents the current high score. The second integer represents the score of the current game. Name of Data File: pr21.dat Output: Your program should produce n lines of output (one for each data collection). The output for each data collection should contain a single phrase indicating if a new high score has been achieved. If the score of the current game ties or exceeds the current high score, then the output should be NEW HIGH SCORE. Otherwise, the output should be TRY AGAIN. The output is to be formatted exactly like that for the sample output given below. Assumptions: The value of n will be between 1 and 100, inclusive. Each input integer will be between 0 and 1,000,000,000 inclusive. Sample Input: 3 99 100 100 99 1 1 Sample Output: NEW HIGH SCORE TRY AGAIN NEW HIGH SCORE pr21.dat (separate input file) 9 12 8 1000 9 700 701 12345 12345 54321 54312 999999 100000 999999 1000000 999999 999999 999999 99999 ========================================= ========================================= ========================================= A+ Computer Science - October Problem Set ========================================= ========================================= ========================================= 1. McSpeak Program Name: McSpeak.java Input File: mcspeak.dat McDonald‘s food item often contain the letters ―Mc in front of the real name. For example, Nuggets become McNuggets and a Double becomes McDouble. Add the letters Mc in front of the item! Input: The first line consists of the number of data elements in the file (the number of food items), followed by that number of lines. Each line will contain a single-word food item. Output: Show each food item with ―Mc‖ before it. Example Input File 3 Salad Nuggets Chicken Output to screen: McSalad McNuggets McChicken Solution -------- import java.util.*; // for Scanner from Java 1.5, 1.6 import java.io.*; // for file input import static java.lang.System.*; public class McSpeak { public static void main(String[] args) throws IOException { int i,a; String s; Scanner input = new Scanner(new File("mcspeak.dat")); // PrintWriter output = new PrintWriter(new File("mcspeak.out")); s=input.nextLine().trim(); a=Integer.parseInt(s); for( i=0;i