a1

a1 - ASSIGNMENT 1 Expressions Data Types and Simple...

Info iconThis 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-202B, Winter 2010, All Sections Due: Friday, January 22, 2010 (23:55) You MUST do this assignment individually and, unless otherwise specified, you MUST follow all the general instructions and regulations for assignments. 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: 10 points Part 2, Question 2: 30 points Part 2, Question 3: 30 points Part 2, Question 4: 30 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Part 2 (10 + 30 + 30 + 30 = 100 points) The questions in this part of the assignment will be graded. Question 1: Regulations (10 points) Answer the following questions, and justify your answer in each case. Save your answers in a PLAIN TEXT file called question-1.txt and submit it to myCourses. BE BRIEF ; all of these can be answered in one or two sentences, and overly long answers will be grounds for mark deductions. The answers to each of these questions can be found in the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 10/16/2010.

Page1 / 5

a1 - ASSIGNMENT 1 Expressions Data Types and Simple...

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