Write Java Program User Input Must Output User Typed B Test Input C D E Output 6e D C Test Q43889112

Write a java program, when user input  foo bar,

it must output It must output exactly: 2 bar foo

When user typed

a b “test input” c d e

output is:

6e d c test input b a

(no quote marks and total 6, not 7)

foo bar It must output exactly: 2 bar foo Show transcribed image text foo bar
It must output exactly: 2 bar foo

Expert Answer


Answer to Write a java program, when user input , it must output When user typed a b “test input” c d e output is: 6 e d c test in…

Write Java Program Write Java Application Reads Three Integers User Displays Sum Product A Q43862298

Write a Java program:

Write a Java application that reads three integers from the userand displays the sum, product, average, smallest, largest, andmedian of the numbers. Use the following sample code as aguide.

import java.util.Scanner;

public class IntegerOps {

public staticvoid main(String[] args)

{

int num1, num2, num3;

int sum,;

// Use Scanner class to read the three integer

sum = sum(num1, num2, num3); //The sum methodcalculates the sum

//Call product method to calculate the product

//Call product method to calculate the average (real number)

//Call product method to calculate the smallest number

//Call product method to calculate the largest number

//Call product method to calculate the median of the 3numbers

System.out.println(“Sum = ” +sum);

// Print the product, average, smallest, largest, and median inseparate lines

}

/**

* This method calculates the sum of 3 integers

* @param x the first integer

* @param y the second integer

* @param z the third integer

* @return the sum of the 3 integers

*/

public staticint sum(int x,int y, int z)

{

return x + y + z;

}

}

Below is an example of how to calculate the median of 3integers.

public class Test {

public staticvoid main(String[] args) {

int x= 6;

int y = 4;

int z = 8;

int larger1, smaller1, larger2, smaller2,median;

smaller1 = x; //assuming the smaller of x & y is x

larger1 = y; //assuming the larger of x & y is y

smaller2 = x; //assuming the smaller of x & z is x

larger2 = z; //assuming the larger of x and z is z

if(y < x) //fix the above assumptions of thex & y if needed

{

smaller1 = y;

larger1 = x;

}

if(z < x) //fix the above assumptions of thex & z if needed

{

smaller2 = z;

larger2 = x;

}

median = smaller2; //assume the median is smaller2. We will fixit later if needed

if (smaller1 == smaller2) //if the smaller ofthe two pairs is the same, then the median is one of thefollowing

{

if(larger1 < larger2) //the median cannot bethe largest number, so it is the smaller of the two largest

median = larger1;

else

median = larger2;

}

else if (smaller1 >smaller2) //if the smaller of the two pairs are not equal, then thelarger of the two is the median

median = smaller1;

//could have added an else here, but is really the aboveassumption of median=smaller2 so it is omitted.

System.out.printf(“median=%d”,median);

}

}

Expert Answer


Answer to Write a Java program: Write a Java application that reads three integers from the user and displays the sum, product, av…

Write Java Program Write Java Application Reads Three Integers User Displays Sum Product A Q43866085

Write a Java program:

Write a Java application that reads three integers from the userand displays the sum, product, average, smallest, largest, andmedian of the numbers. Use the following sample code as aguide.

import java.util.Scanner;

public class IntegerOps {

public staticvoid main(String[] args)

{

int num1, num2, num3;

int sum,;

// Use Scanner class to read the three integer

sum = sum(num1, num2, num3); //The sum methodcalculates the sum

//Call product method to calculate the product

//Call product method to calculate the average (real number)

//Call product method to calculate the smallest number

//Call product method to calculate the largest number

//Call product method to calculate the median of the 3numbers

System.out.println(“Sum = ” +sum);

// Print the product, average, smallest, largest, and median inseparate lines

}

/**

* This method calculates the sum of 3 integers

* @param x the first integer

* @param y the second integer

* @param z the third integer

* @return the sum of the 3 integers

*/

public staticint sum(int x,int y, int z)

{

return x + y + z;

}

}

Below is an example of how to calculate the median of 3integers.

public class Test {

public staticvoid main(String[] args) {

int x= 6;

int y = 4;

int z = 8;

int larger1, smaller1, larger2, smaller2,median;

smaller1 = x; //assuming the smaller of x & y is x

larger1 = y; //assuming the larger of x & y is y

smaller2 = x; //assuming the smaller of x & z is x

larger2 = z; //assuming the larger of x and z is z

if(y < x) //fix the above assumptions of thex & y if needed

{

smaller1 = y;

larger1 = x;

}

if(z < x) //fix the above assumptions of thex & z if needed

{

smaller2 = z;

larger2 = x;

}

median = smaller2; //assume the median is smaller2. We will fixit later if needed

if (smaller1 == smaller2) //if the smaller ofthe two pairs is the same, then the median is one of thefollowing

{

if(larger1 < larger2) //the median cannot bethe largest number, so it is the smaller of the two largest

median = larger1;

else

median = larger2;

}

else if (smaller1 >smaller2) //if the smaller of the two pairs are not equal, then thelarger of the two is the median

median = smaller1;

//could have added an else here, but is really the aboveassumption of median=smaller2 so it is omitted.

System.out.printf(“median=%d”,median);

}

}

Expert Answer


Answer to Write a Java program: Write a Java application that reads three integers from the user and displays the sum, product, av…

Write Java Statement Create Variable Type Int Assign Product Variables Band C Html Editor Q43903573

Write a java statement to create a variable a of type int and assign it the product of variables band c. HTML EditorWrite a java statement to create a variable a of type int and assign it the product of variables band c. HTML Editor Show transcribed image text Write a java statement to create a variable a of type int and assign it the product of variables band c. HTML Editor

Expert Answer


Answer to Write a java statement to create a variable a of type int and assign it the product of variables band c. HTML Editor…

Write Javascript Code Calculating Income Tax Using Else Else Statement Write Code Add Loop Q43893392

  • Write JavaScript code for calculating the income tax using if –else if – else statement.
  • Write code to add a loop that repeatedly calculates incometaxes for different taxable incomes until you enter 10000000 to aprompt window to stop it.
  • Not using $ sign and comma in the code
  • Need a prompt and alert window
  • Here’s my code
  • <script>
    var taxableIncome=0;
    var incomeTax;
    do {
    var taxableIncome = prompt(“Enter a valid taxable incomen” + “Orenter 10000000 to end tax calculator”);
      
    if (taxableIncome< 0) {
    alert(“Please enter a valid postive income”)
    }
    else if (taxableIncome>0 && taxableIncome<9700){
    incomeTax = (taxableIncome * 0.1);
    alert (“Your Income Tax is: ” + incomeTax);
    }
    else if (taxableIncome>9701 && taxableIncome<39475){
    incomeTax = 970 + (taxableIncome – 9700)* 0.12;
    alert (“Your Income Tax is: ” + incomeTax);
    }
    else if (taxableIncome>39476 && taxableIncome<84200){
    incomeTax = 4543 + (taxableIncome – 39475)* 0.22;
    alert (“Your Income Tax is: ” + incomeTax);
    }
    else if (taxableIncome>84201 && taxableIncome<160725){
    incomeTax = 14382 + (taxableIncome – 84200)* 0.24;
    alert (“Your Income Tax is: ” + incomeTax);
    }
    else if (taxableIncome>160726 &&taxableIncome<204100) {
    incomeTax = 32748 + (taxableIncome – 160725)* 0.32;
    alert (“Your Income Tax is: ” + incomeTax);
    }
    else if (taxableIncome>204101 &&taxableIncome<510300) {
    incomeTax = 46628 + (taxableIncome – 204100)* 0.35;
    alert (“Your Income Tax is: ” + incomeTax);
    }
    else if (taxableIncome>510301){
    incomeTax = 153798 + (taxableIncome – 510300)* 0.37;
    alert (“Your Income Tax is: ” + incomeTax);
    }
    else
    alert (“Your Income Tax is: ” + incomeTax);
    }
    while(taxableIncome != 10000000)
       </script>
  • I still have a problem to end the loop, and could anyone helpme to simplfy my code as well.

Expert Answer


Answer to Write JavaScript code for calculating the income tax using if – else if – else statement. Write code to add a loop …

Write Javaserver Faces Program Guarantee Thumbs Instructions Need Help Creating Screensho Q43782045

WRITE A JAVASERVER FACES PROGRAM . (WILL GUARANTEE ATHUMBS UP)

BELOW ARE INSTRUCTIONS:

Need Help Creating screenshot image below usingJSF(JavaServes Faces)

userId: password: Vaksa RE-ENTER THE CHARACTERS Login

userId: password: Vaksa RE-ENTER THE CHARACTERS Login Show transcribed image text userId: password: Vaksa RE-ENTER THE CHARACTERS Login

Expert Answer


Answer to WRITE A JAVASERVER FACES PROGRAM . (WILL GUARANTEE A THUMBS UP) BELOW ARE INSTRUCTIONS: Need Help Creating screenshot im…

Write Javaserver Faces Program Ui Design Guarantee Thumbs Instructions Need Help Creating Q43798634

WRITE A JAVASERVER FACES PROGRAM OF THE UI DESIGN BELOW. (WILL GUARANTEE A THUMBS UP)

BELOW ARE INSTRUCTIONS:

Need Help Creating screenshot image below usingJSF(JavaServes Faces)

*** PLEASE ALSO NOTICE THAT THERE IS TWO SAVE BUTTONS.ONE OF THE BUTTONS SHOULD BE “NEXT”

Manage Identity Select the Type of Bulk Upload Create Identity Save Save cancle Rest

***When clicked on Next button ,Need to display theother form(SCREENSHOT) as below:

Create Identity All Fields Are Mandatory Type* true: Validation Error: Value is required Username password wemame: Validation

Manage Identity Select the Type of Bulk Upload Create Identity Save Save cancle Rest Create Identity All Fields Are Mandatory Type* true: Validation Error: Value is required Username password wemame: Validation Error: Value is required. – Confirm password* password: Validation Error: Value is required Employee Id* cimpazzuord: Validation Error: Value is required First Name* Employeeld: Validation Errer. Value is required. Last Name* firstName: Validation Error: Value is required. Email Id* lastName: Validation Error: Value is required Manager Name* emailld: Validation Error Valve is required. -Display Name manageName: Validation Error: Value is required org Code displayName: Validation Error: Value is required. -Appt Type orgcode: Validation Error: Value is required Create Identity message* appt Type: Validation Error: Value is required -Status* createIdentity: Validation Error: Value is required Application to Verify status: Validation Error: Value is required Access to verify appltoverify: Validation Error: Valve is required. Role to Verify* Show transcribed image text Manage Identity Select the Type of Bulk Upload Create Identity Save Save cancle Rest
Create Identity All Fields Are Mandatory Type* true: Validation Error: Value is required Username password wemame: Validation Error: Value is required. – Confirm password* password: Validation Error: Value is required Employee Id* cimpazzuord: Validation Error: Value is required First Name* Employeeld: Validation Errer. Value is required. Last Name* firstName: Validation Error: Value is required. Email Id* lastName: Validation Error: Value is required Manager Name* emailld: Validation Error Valve is required. -Display Name manageName: Validation Error: Value is required org Code displayName: Validation Error: Value is required. -Appt Type orgcode: Validation Error: Value is required Create Identity message* appt Type: Validation Error: Value is required -Status* createIdentity: Validation Error: Value is required Application to Verify status: Validation Error: Value is required Access to verify appltoverify: Validation Error: Valve is required. Role to Verify*

Expert Answer


Answer to WRITE A JAVASERVER FACES PROGRAM OF THE UI DESIGN BELOW . (WILL GUARANTEE A THUMBS UP) BELOW ARE INSTRUCTIONS: Need Help…

Write Json Api Q43788142

write a JSON API.

Expert Answer


Answer to write a JSON API….

Write Little Man Program Accepts Three Values Input Produces Largest Three Output Simulate Q43807969

Write a Little Man program that accepts three values as inputand produces the largest of the three as output. Simulate thisprogram with the online LMC simulator.​

Expert Answer


Answer to Write a Little Man program that accepts three values as input and produces the largest of the three as output. Simulate …

Write Lmc Programs Complete Following Tasks May Need Use Brz Brp Br Commands Well Task Sub Q43794431

Write LMC programs tocomplete the following tasks. You may need to use the BRZ, BRP andBR commands here as well. For each task you should submit annotatedmnemonics:

  1. Ask the user for two numbersand multiply the two numbers and print out the product.
  2. Ask the user for two numbersand divide them and print out the quotient and the remainder.
  3. Ask the user for two numbersand print out the biggest.

Forexample:    Test data: 7, 9; Expected output:9

Test data: 9, 7;Expected output: 9

  1. Ask the user for two numbers.If they are the same then print 0, otherwise add them and print outthe answer.

For example:

Test data: 3, 9;Expected output: 12

Test data: 7, 7;Expected output: 0

  1. Ask the user for one largernumber and one factor of that number (e.g. 15 and 3, 20 and 5). Theprogram should keep subtracting the smaller number until it reaches0 – where it should print out 0.

Expert Answer


Answer to Write LMC programs to complete the following tasks. You may need to use the BRZ, BRP and BR commands here as well. For e…