a1

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

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-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
Image of page 1

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

View Full Document Right 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.
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