a.
Explanation of Solution
Program:
File name: “Alphabetize.java”
//Import necessary header files
import java.util.*;
//Define a class named Alphabetize
public class Alphabetize
{
//Define main method
public static void main(String[] args)
{
//Declare the variables
String str1, str2, str3;
//Create an object for the Scanner class
Scanner in = new Scanner(System.in);
//Prompt the user to enter the first string
System.out.print("Enter first string >> ");
str1 = in.nextLine();
//Prompt the user to enter the second string
System.out.print("Enter second string >> ");
str2 = in...
b.
Explanation of Solution
Program:
File name: “Alphabetize2.java”
//Import necessary header files
import java.util.*;
//Define a class named Alphabetize2
public class Alphabetize2
{
//Define main method
public static void main(String[] args)
{
//Declare the variables
String str1, str2, str3;
//Create an object for the Scanner class
Scanner in = new Scanner(System.in);
//Prompt the user to enter the first string
System.out.print("Enter first string >> ");
str1 = in.nextLine();
//Prompt the user to enter the second string
System.out.print("Enter second string >> ");
str2 = in.nextLine();
//Prompt the user to enter the third string
System.out.print("Enter third string >> ");
str3 = in.nextLine();
//Check if the Strings were entered in alphabetical order
if(str1.toLowerCase().compareTo(str2.toLowerCase()) < 0)
if(str2.toLowerCase().compareTo(str3.toLowerCase()) < 0)
//Print the result
System.out.println(str1 + " " + str2 + " " + str3);
else
if(str3...

Want to see the full answer?
Check out a sample textbook solution
- Compute the jackknife estimate of bias and standard error for the correlation statistics from the law82 data using r languagearrow_forwardQuestion D.1: Effective Access Time A computer keeps its page tables in memory. Memory access time is 100 nanoseconds (ns). Answer the following questions about the performance of this setup. Show your work. a) What is the effective access time (i.e. reading a word in memory) with no caching and a two-level page table? b) Consider the above scenario but with a TLB having a cache hit rate of 98%. If the TLB takes 20 ns to access, what is the effective access time of this setup when considering this TLB?arrow_forwardThe data law82 in bootstrap library contains LSAT and GPA for 82 law schools. 1. Write you own R code to estimate the correlation between LSAT and GPA scores, and compute the bootstrap estimate of the standard error and bias of the sample correlation. 2. Use the boot function in boot library to compute the bootstrap estimate of the standard error and bias of the sample correlation. Compare your results in 1 with the function output. using r languagearrow_forward
- i would like to get help to resolve the following casearrow_forwardChallenge: Assume that the assigned network addresses are correct. Can you deduce (guess) what the network subnet masks are? Explain while providing subnet mask bits for each subnet mask. [Hint: Look at the addresses in binary and consider the host ids]arrow_forwardWhat is the main difference between Static routing and Dynamic routing (OSPF)? in terms of either wildcard mask or subnet mask, or especially for increasing the number of networks, explaining the reason while providing a specific example like what command they use in CLIarrow_forward
- Add a new class Checking Account that inherits from the BankAccount class, and has a double instance variable overdraftLimit in addition to the variables inherited from the superclass. Create a constructor for the Checking Account class that takes in the account number, account holder name, initial balance, account type and overdraft limit as input, and uses the super keyword to call the constructor of the superclass, passing in the account number, account holder name and initial balance, account type. Re-write the withdraw() method in the CheckingAccount class so that it first checks if the withdrawal amount is less than the current balance plus the overdraft limit. If it is, the withdrawal is allowed and the balance is updated. If not, the method should return an error message "Insufficient funds". Create a new method displayOverdraft Limit() that returns the overdraft limit of the Checking Account. In the BankAccountTest class, create a new object of type Checking Account with…arrow_forwardNeed help answering this pseudocode row questionarrow_forwardNeed help! Wheres the error in the pseudocode?arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT



