SweetStudy (HomeworkMarket.com)
  • homework question
    chat0
Home.Literature.
Help.
  • Contact Us
  • FAQ
Log in / Sign up
  • Log in / Sign up
  • Post a question
  • Home.
  • Literature.
  • Help.
  • Contact Us
  • FAQ
  • java2

    profileGhamdikar
    java2.docx
    Home>Computer Science homework help>java2

    Assignment 2

    Due date: 1/3/2016 at 11:59 PM

    `

    Course Title: Business Computer Languages

    Course Code : IT 401

    Assignment 2

    Note :

    · Due date: 03/01/2016 at 11:59 PM.

    · 05 Marks

    · Copied assignment will be graded zero mark.

    · Assignment submitted after due date will not be accepted; it will be considered to be late and will have zero mark.

    Q1. Identify and correct the error(s) in each of the following: [1.5 Points]

    a) if (1 <= x <= 10)

    System.out.println(x);

    b) if (x = 1)

    y++;

    else if (x = 2)

    y = y + 2;

    c) final double CM_PER_INCH = 2.54;

    CM_PER_INCH = 2.55;

    Q2. What are the values of the following expressions? In each line, assume that

    1. What are the values of the following expressions? In each line assume that [1.5 Points] double X = 2.5, Y = -1.5; int M = 18, N = 4; String S = "Hello", T = "World";

    0. X + N * Y - ( X + N ) * Y

    0. M / N + M % N

    0. 5 * X - N / 5

    0. S + T

    0. S + N

    0. ( 1 - ( 1 - ( 1 - ( 1 - N ))))

    Q3. Write a program called CheckPassFail which read the mark from user and prints "PASS" if the mark is more than or equal to 60; or prints "FAIL" otherwise. [2 Points]

    2 | Page

    1. Applied Sciences
    2. Architecture and Design
    3. Biology
    4. Business & Finance
    5. Chemistry
    6. Computer Science
    7. Geography
    8. Geology
    9. Education
    10. Engineering
    11. English
    12. Environmental science
    13. Spanish
    14. Government
    15. History
    16. Human Resource Management
    17. Information Systems
    18. Law
    19. Literature
    20. Mathematics
    21. Nursing
    22. Physics
    23. Political Science
    24. Psychology
    25. Reading
    26. Science
    27. Social Science
    28. Liberty University
    29. New Hampshire University
    30. Strayer University
    31. University Of Phoenix
    32. Walden University
    • Home
    • Homework Answers
    • Archive
    • Tags
    • Reviews
    • Contact
      • twitter
      • facebook
    Copyright © 2026 SweetStudy.com (Step To Horizon LTD)