Assignment 3.pdf - CSE110 Assignment 3 Task 1 Write...

This preview shows 1 out of 2 pages.

CSE110 Assignment 3 Task 1: Write javacode of a program that reads a student’s mark for a single subject, and prints out “ Pass if the student got more than 50, and “You shall not pass” otherwise. Task 2: Write javacode of a program that reads a student’s mark for a single subject, and prints out the corresponding grade for that mark. The mark ranges and corresponding grades are shown in the table below. Valid range of marks is 0 to 100. Print “Wrong Input” otherwise. Marks Grade 90 and above A 80-89 B 70-79 C 60-69 D 50-59 E Below 50 F Task 3: Write javacode of a program for finding area of a rectangle given height and width by the user. Task 4: Write javacode of a program that calculates the tax as follows: a) No tax if you get paid less than 10,000 b) 5% tax if you get paid between 10K and 20K c) 10% tax if you get paid more than 20K d) NO TAX IF YOU ARE LESS THAN 18 YEARS OLD. Hint: Take payment and age from user as inputs; then calculate tax and prints it. Task 5: Write javacode of a program that finds the number of hours, minutes, and seconds in a given number of seconds. For example, how many hours, minutes, and seconds are there in 10,000 seconds? Task 6: Suppose the following expressions are used to calculate the values of L for different values of S: L = 3000 125 S 2 12000 L = 4 S 2 14900 if S >= 100 Write javacode of a program that reads a value of S and then calculates the value of L.
Image of page 1

Subscribe to view the full document.

Image of page 2
You've reached the end of this preview.
  • Fall '16
  • Mr. Shamsul HaqKaonain

{[ 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