What are the implicit and explicit parameters


Assignment

Question One

Giving the following code snippet. What kind of errors you will get and how can you correct it.

A. public class HelloJava
{
public static void main(String args[])
{
int x=10;
int y=2;
System.out.print(x*y=");
System.out.printl(x*y);
}
}

B. public class HelloJava
{
public static void main(String args[])
{
int x=10;
int y=0;
System.out.print(x/y);
}

Question Two

A. Write a program that reads the following string "Hello, This is IT401 assignment 1" and does the following:

1. Use the replace method of the class String and replace IT401 with Business computer language.
2. Print the number of characters in the string after the replacement.

B. Is the replace method of class String an accessor method or a mutator method. Explain your answer.

Question Three

Given the following class create 2 instances of the class and initialize them with the values "Business computer language" and "IT401" respectively.

public class GradeBook{
private String courseName;
public GradeBook () {
courseName =""; }
public GradeBook (String name) {
courseName = name; }
public String getCourseName() {
return courseName; }
public void displayMessage() {
System.out.println("welcome, this is" + getCourseName()); }}

Question Four

What are the implicit and explicit parameters for the following methods:

Box1.translate(5,10);

momSavings.getBalance();

Question Five

Write the following formula in java expression. Show all the required steps.

x=(b^3+√(y^2-2a))/(b-6c)

Format your assignment according to the following formatting requirements:

1. The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.

2. The response also include a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.

3. Also Include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: What are the implicit and explicit parameters
Reference No:- TGS02126599

Expected delivery within 24 Hours