Assignment1

Assignment1 - ASSIGNMENT 1 Expressions, Data Types, and...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ASSIGNMENT 1 Expressions, Data Types, and Simple Calculations COMP-202A, Fall 2010, All Sections Due: Wednesday, September 22, 2010 (23:55) This assignment covers material from UNIT 1 and UNIT 2 . You MUST do this assignment individually and, unless otherwise specified, you MUST follow all the general instructions and regulations for assign- ments. Graders have the discretion to deduct up to 10% of the value of this assignment for deviations from the general instructions and regulations. Part 1, Question 1: 0 points Part 1, Question 2: 0 points Part 2, Question 1: 4 points Part 2, Question 2: 6 points Part 2, Question 3: 50 points Part 2, Question 4: 20 points Part 2, Question 5: 20 points 100 points total Part 1 (0 points): Warm-up Do NOT submit this part, as it will not be graded. However, doing these exercises might help you to do the second part of the assignment, which will be graded. If you have difficulties with the questions of Part 1, then we suggest that you consult the TAs during their office hours; they can help you and work with you through the warm-up questions. Warm-up Question 1 (0 points) Create a file called HelloWorld.java , and in this file, declare a class called HelloWorld . This class should define only one method called main() . In the body of this method, use System.out.println() to display Hello world! . You can find such a class in the lecture slides; make sure you can compile and run it properly. Warm-up Question 2 (0 points) Create a file called Echo.java , and in this file, declare a class called Echo . This class should define only one method called main() ; this method should ask the user to enter a line of text, read a line of text from the keyboard, and display the line the user entered to the screen. Use the file Template.java as a starting point; this file is available from the course home page. Sample session: Enter a line of text: This question is easy Here is the line you entered: This question is easy 1 Part 2 (4 + 6 + 50 + 20 + 20 = 100 points) The questions in this part of the assignment will be graded. Question 1: Regulations (4 points) The answers to the questions below can be found in the following documents, all available on the course website ( http://www.cs.mcgill.ca/ ~ cs202/2010-09/#assignments ): General Regulations and Instructions for Assignments , Assignment Submission Instructions and Policy on Queries and Com- plaints About Assignment Grading . Save your answers in a PLAIN TEXT file called question-1.txt and submit it to myCourses. 1. Why are the assignment regulations so strict about naming conventions for methods, variables, class names, file names and so on? 2. Who should you contact by e-mail if you think your assignment has been graded unfairly/inaccurately and want the grade changed?...
View Full Document

This note was uploaded on 02/22/2011 for the course COMP 202 taught by Professor Verbrugge during the Fall '07 term at McGill.

Page1 / 6

Assignment1 - ASSIGNMENT 1 Expressions, Data Types, and...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online