Question: Install latest version of Eclipse Create Hello World program using this following code public class helloworld { public static void main(String args[]) { System.out.print(Hello World);

  1. Install latest version of Eclipse
  2. Create Hello World program using this following code

public class helloworld {

public static void main(String args[]) {

System.out.print("Hello World");

}

}

  1. Use primitive and reference data type such as integer, double, char and String.

int num = 10;

double decnum = 10.18;

char character= 'a';

String words= "Hello World";

  1. Create a simple method and invoke the method in the main program.

public class Adder {

public int add2num(int num1, int num2) {

return (num1 + num2);

}

public static void main(String args[]) {

int number1 = 50, number2 = 20;

Adder sum = new Adder();

int summation = sum.add2num(number1,number2);

System.out.print(summation);

}

}

1.1. Design an algorithm and write a program that prints the message

My name is John Doe

I like BER2071 Computer Engineering and AI Lab.

  1. all on one line
  2. on two lines
  3. inside a box drawn with asterisks

1.2. Find the errors in the following program.

class OperatorExample{

public static void main(String args[]){

Systemout.print(The answer of 10x10/5+3-1x4/2 is /n);

System.Out.println(10*10/5+3-1*4/2)

}

Sample Output:

The answer of 10x10/5+3-1x4/2 is

21

1.3. Design an algorithm and Write a program that converts degree Fahrenheit (TF) to degrees Celsius (TC) (Recall that TC=TF-32*59 )

  • Choose the suitable variables type.
  • Create a method called FtoC that accept TF(double) and return TC(double)
  • The program should ask the user to enter the degree Fahrenheit (TF).
  • Your program should also output your name and student ID number at the top.

Sample Output:

My name is John Doe with ID number 1002056019

Enter the temperature in Fahrenheit: 75.5

75.50 degree Fahrenheit is equal to 24.17 degree Celsius. PLEASE USE ECLIPSE as IDE and send it asap. PLEASE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!