Java Application

i. Write a Java program named ShowEscapeSequences.java that displays the following:

I really like
CIS355A
“Business Application Programming with Lab using JAVA”

ii. Write an application called Circle.java that inputs from the user the radius of a circle as an integer and prints the circle’s diameter, circumference and area. Use the GUI technique message dialog box shown in the week1 lecture.
Use the following formulas:

diameter = 2*radius
circumference = 2*Math.PI*radius
area = Math.PI*radius*radius

Use the predefined constant Math.PI for your calculation. This constant is more precise than the value 3.14159. Class Math is defined in the java.lang package, so you do not need to import it.
Do not store the results of each calculation in a variable. Rather, add the result of each directly to a string that will be used to display the results.

iii. Write an application called PracticeArithmeticOperators.java that inputs one number consisting of five digits from the user, separates the number into its individual digits and prints the digits separated from one another by five spaces each. For example, if the user types in the number 49872, the program should print
4 9 8 7 2

I want the code to be written in NetBeans software.

Leave a Reply

Your email address will not be published. Required fields are marked *