Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

I need to write homework ask for " two tasks. 1 task is to change the style of the open-close brackets/curley braces from the end-of-line style to next-line-style". Mine works for second task well. For first task works mostly but { bracket is not at the right indent.
The manager of Pizza Palace wants a program that calculates and displays the number of slices of pizza into which a circular pizza can be divided. The manager will enter the radius of the entire pizza. For this problem, use 14.13 as the area of a pizza slice, and use 3.14 as the value of pi. Write a Java program to help the manager of Pizza Palace
An online retailer sells five products whose retail prices are
as follows: Product 1, $2.98; product 2, $4.50; product 3, $9.98; product
4, $4.49 and product 5, $6.87. Write an application that reads a series of
pairs of numbers as follows:
a) product number
b) quantity sold
Your program should use a switch statement to determine the retail price
for each product. It should calculate and display the total retail value of all
products sold. Use a sentinel-controlled loop to determine when the
program should stop looping and display the final results.
The cost of a brand new car is P420,000 for GL model and P3398,000 XL model. If a car phone will be installed, an additional P40,000 will be added to the cost. Moreover, 15% discount on the total cost will be given if the buyer pays in full (not installment), Write a Program that would input the car model bought, whether with car phone, use code ‘’W’’ for with car phone and ‘’O’’ for without car phone) and whether it will be paid in full (use code’’F’’ for full payments and ‘’I’’ for instalment). Program must then output the cost of the car.
how many different ways there are to assign n nodes to k channels. Take a simple example of assigning 3 nodes to 2 channels. We will identify the channels by numbers, starting with 0, and nodes by characters, starting with A. Example: All three nodes (A, B, and C) select channel 0, and channel 1 is not used at all
Channel 0: nodes A, B, C Channel 1: empty
2. Two nodes select channel 0 and the remaining third node uses channel 1. There are three different possibilities for the identify of this third node, so there are three distinct ways in which this configuration can be achieved:
Channel 0: nodes A, B
Channel 0: nodes A, C
Channel 0: nodes B, C
Channel 1: node C
Channel 1: node B
Channel 1: node A.
1.Write a code fragment that prints the contents of a two-dimensional boolean array, using * to represent true and a space to represent false. Include row and
column numbers.package homework;
2.What values does the following code put in the array a [] ?
int N = 10;
int[] a = new int[N];
a[0] = 1;
a[l] = 1;
for (int i = 2; i < N; i++)
a[i] = a[i-l] + a[i-2];
3.Write a static method max3 () that takes three int values as arguments and returns the value of the largest one.Add an overloaded function that does the same thing with three double values.
Write a method multiply() that takes two square matrices of the same
dimensionasarguments andproduces their product(another square matrix ofthat
samedimension). Extra credit: Make your program work wheneverthe number of
rows in the first matrix is equalto the number of columns in the second matrix.
* Write a method any() that takes an arrayof bool ean values as argument
and returns true if any of the entries in the array is true, and fal se otherwise.
Write a method all() that takes an array of bool ean values as argument and re
turns true if allof the entries in the arrayaretrue, and fal se otherwise.
/everytime i run this program it shows my answer is incorrect. Please show me my problem


import java.util.Scanner;

public class Exercise04_22 {

public static void main(String[] args) {
Scanner input = new Scanner(System.in);

System.out.print("Enter string s1: ");
String string1 = input.next();

System.out.print("Enter string s2: ");
String string2 = input.next();

boolean retVal;
retVal = string1.equals(string2);

if (retVal = true) {
// Returns -1 if not matched.

System.out.println(string2 + " is a substring of " + string1);
} else {
System.out.println(string2 + " is not a substring of " + string1);
}
}
}
What is the main difference between struts framework and spring freamework?
How to write a program for calculator in java without using swing?
LATEST TUTORIALS
APPROVED BY CLIENTS