Dubai Knowledge Village**We aren't endorsed by this school
Course
CPT 101R
Subject
Computer Science
Date
Dec 28, 2024
Pages
2
Uploaded by ProfessorPenguinMaster1253
Introduction to Java Programming Assignment 1IDEs such as Eclipse or Netbeans may NOT be used in this practical. Therecommended text editors are:Notepad++ for Windows (http://notepad-plus-plus.org/)and TextWrangler for Mac (http://www.barebones.com/products/textwrangler/).Note: Before starting the exercises below, make sure you have completed and submitted Practical 1 on moodle.Create a “assignment1” folder for the purposes of this practical. For each of the belowquestions, you are expected to write a Java program (in files called Q1.java – Q9.java), compile and run it from the command line/terminal. Remember indentation and commenting is required!1.Write a program that displays the result of:2.Write a program that displays the result of 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 93.Write a program that reads a Celsius degree in double from the console, then converts it to Fahrenheit and displays the result. The formula for the conver-sion is as follows: fahrenheit = (9 / 5) * celsius + 32 Hint: In Java, 9 / 5 is 1, but 9.0 / 5 is 1.8. 4.Write a program that reads an integer between 0 and 1000 and adds all the dig-its in the integer. For example, if an integer is 932, the sum of all its digits is 14.5.Write a program that displays the following table (Notice the alignment of the columns, no calculations needed):ab pow(a, b) 121 2383 4 81 4 5 1024 5 6 15625
Submission InstructionsCreate a zip file containing all of this week’s solutions.Name your zip file in the format of…“lastname_firstname_studentnumber_assgnment1_.zip”Replace the name and studentnumber with your own name and student number. e.g. “Bloggs_Joe_12123456_assignment1”. Upload your zip file using the Assignment1 submission form available on Moodle.