CS100 Spring 2000 Professors David I. Schwartz & Thomas Yan Project 1: A New Hope Due: Tuesday, February 1, 2000 1. Goals This assignment has four roles: + To help you become familiar with CS100 policies and procedures. + To ensure you have necessary Internet skills, such as email, news, and web browsing. + To help you practice with CodeWarrior. + To help you develop a program in Java. 2. Background In large introductory courses, policy and procedure demand attention. The degree to which a student follows requirements often helps or harms that student's grade. Also, a student who fails to understand the available tools for the assignments rapidly falls behind. So, this assignment requires you to read the course information, understand the policies and procedures, and implement the basic software tools. 3. Problems This assignment has two main parts, shown below. Remember to follow the submission requirements in the Projects page on the CS100 Course Website. 3.1 Part 1: Short Answer Questions/Internet Tasks Follow these steps: + Go to a computer. + Go to the CS100 Newsgroup on USENET. Hint: See the material link on the website. + Find the article with subject PROJECT 1 INFORMATION. Beware of fakes! Only an article posted by dis@cs.cornell.edu or tyan@cs.cornell.edu is legitimate for this assignment. + Forward the correct article to yourself as email. + Answer the questions inside the article, following the instructions therein. For example, do not delete the questions. Each answer you type should follow each question. 3.2 Part 2: Programming This portion requires you to develop and test a program that has the following template with, of course, your name(s) and information: // Name: Vincent Schiavelli Partner: Brian Thompson // ID: 123-456 ID: 654-123 // Sec: Fan, Wed 1:25 Sec: Artemov, Thu 1:25 // // Date: Feb 1, 2000 // Project 1: A New Hope public class project1 { public static void main(String[] args) { // Code to be filled in by you! } } You must use the above template. Note that the template requires you to change the Java Target setting to project1. The program must perform the following tasks in the sequence below: + Output the sentence $Hello, world!$ to the screen. (The "$" notation indicates program elements, like code and output.) + Output the sentence $I am now calculating something irrelevant, but interesting.$ + Assign the number of days in a year to the variable $daysPerYear$. + Assign the number of hours in a day to the variable $hoursPerDay$. + Assign the number of minutes in an hour to the variable $minutesPerHour$. + Assign the number of seconds in an minute to the variable $secondsPerMinute$. + Calculate the number of seconds in a year using the variables $daysPerYear$, $hoursPerDay$, $minutesPerHour$, and $secondsPerMinute$. Assign the result to a suitably named variable. + Output a brief label followed by the percent error of pi times 10 million seconds from the number of seconds in one year, all in the same line. Hints: You can represent pi as $Math.PI$ in Java. You may calculate the percent error with the formula estimated - actual 100 x ------------------ actual + Output the sentence $I am done.$ Be sure to include appropriate commentary and follow a clear and consistent style. Print your program and output when you are satisfied with the program's behavior. 4. What To Submit Follow the submission instructions and other procedures from the Projects page on the CS100 Course Website. You should include the following for submission: + The questions and answers from Part 1 + The program and output from Part 2