{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assignment1 - ASSIGNMENT 1 Expressions Data Types and...

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
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? 3. True or False? Suppose the due date for Assignment X is on January 22, and the cutoff date is January 24. John submits his solutions for Assignment X on January 19. A few days later, on January 23, he realizes that he forgot to answer Question 2! Fortunately, since January 23 is before
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern