IN JAVA
Print the two strings in alphabetical order. Assume the strings are lowercase. End with newline. Sample output:
capes rabbits
import java.util.Scanner;
public class OrderStrings {
public static void main (String [] args) {
String firstString;
String secondString;
firstString = "rabbits";
secondString = "capes";
/* Your solution goes here */
return;
}
}

Answers

Answer 1

The soloution to this question is to write a code that print two string in alphabetical order. The two strings are "rabbits" and "capes". When program run, then it will produce or give output "abbirst" and "aceps".

import java.util.Arrays;

import java.util.Scanner;

public class OrderStrings {

public static void main (String [] args)

{

String firstString; // firstString var declaration

String secondString; //secondString var declaration

firstString = "rabbits"; //assigning value to variable

secondString = "capes";// assigning value to variable

char firstStringNOrder[] = firstString.toCharArray();/* converting string to chraracter array*/

Arrays.sort(firstStringNOrder);// sorting into alphabetical order

System.out.println(new String(firstStringNOrder)+'\n');/* printing string in alphabetical order*/

char secondStringNOrder[] = secondString.toCharArray();

Arrays.sort(secondStringNOrder);/*sorting second array*/

System.out.println(new String(secondStringNOrder));

return;}

}

You can learn more about strings in Java at:

https://brainly.in/question/33606534

#SPJ4

IN JAVAPrint The Two Strings In Alphabetical Order. Assume The Strings Are Lowercase. End With Newline.

Related Questions

where do you think data mining by companies will take us in the coming years

Answers

In the near future, the practice of companies engaging in data mining is expected to greatly influence diverse  facets of our daily existence.

What is data mining

There are several possible paths that data mining could lead us towards.

Businesses will sustain their use of data excavation techniques to obtain knowledge about each individual customer, leading to personalization and customization. This data will be utilized to tailor products, services, and advertising strategies to suit distinctive tastes and requirements.

Enhanced Decision-Making: Through the use of data mining, companies can gain valuable perspectives that enable them to make more knowledgeable decisions.

Learn more about data mining from

https://brainly.com/question/2596411

#SPJ1

Which of the following is a feature of fifth generation computers?
Select one:
O a. Use of natural language
O b. All of above
O c. artificial intelligence
O d. bio-chips
Which of the following can you change using the page setup dialog box

Answers

A feature of fifth generation computers is

O b. All of above

What are fifth generation of computers?

The fifth generation of computers is characterized by several features including the use of natural language processing artificial intelligence and bio chips.

These computers are designed to be more intuitive easier to use and capable of advanced problem solving making them ideal for complex tasks such as machine learning and robotics

The development of fifth generation computers is still ongoing and they are expected to have a significant impact on many areas of technology in the future

Learn more about fifth generation computers at

https://brainly.com/question/28722471

#SPJ1

Suppose that a computer has three types of floating point operations: add, multiply, and divide. By performing optimizations to the design, we can improve the floating point multiply performance by a factor of 10 (i.e., floating point multiply runs 10 times faster on this new machine). Similarly, we can improve the performance of floating point divide by a factor of 15 (i.e., floating point divide runs 15 times faster on this new machine). If an application consists of 50% floating point add instructions, 30% floating point multiply instructions, and 20% floating point divide instructions, what is the speedup achieved by the new machine for this application compared to the old machine

Answers

Answer:

1.84

Explanation:

Operation on old system

Add operation = 50% = 0.5

Multiply = 30% = 0.3

Divide = 20% = 0.2

T = total execution time

For add = 0.5T

For multiplication = 0.3T

For division = 0.2T

0.5T + 0.3T + 0.2T = T

For new computer

Add operation is unchanged = 0.5T

Multiply is 10 times faster = 0.3T/10 = 0.03T

Divide is 15 times faster = 0.2T/15= 0.0133T

Total time = 0.5T + 0.03T + 0.0133T

= 0.54333T

Speed up = Old time/ new time

= T/0.54333T

= 1/0.54333

= 1.84

Finish and test the following two functions append and merge in the skeleton file:
(1) function int* append(int*,int,int*,int); which accepts two dynamic arrays and return a new array by appending the second array to the first array.
(2) function int* merge(int*,int,int*,int); which accepts two sorted arrays and returns a new merged sorted array.
#include
using namespace std;
int* append(int*,int,int*,int);
int* merge(int*,int,int*,int);
void print(int*,int);
int main()
{ int a[] = {11,33,55,77,99};
int b[] = {22,44,66,88};
print(a,5);
print(b,4);
int* c = append(a,5,b,4); // c points to the appended array=
print(c,9);
int* d = merge(a,5,b,4);
print(d,9);
}
void print(int* a, int n)
{ cout << "{" << a[0];
for (int i=1; i cout << "," << a[i];
cout << "}\n"; }
int* append(int* a, int m, int* b, int n)
{
// wru=ite your codes in the text fields
}
int* merge(int* a, int m, int* b, int n)
{
// wru=ite your codes in the text fields
}

Answers

Answer:

Explanation:

#include <iostream>

using namespace std;

int* append(int*,int,int*,int);

int* merge(int*,int,int*,int);

void print(int*,int);

int main()

{ int a[] = {11,33,55,77,99};

int b[] = {22,44,66,88};

print(a,5);

print(b,4);

int* c = append(a,5,b,4); // c points to the appended array=

print(c,9);

int* d = merge(a,5,b,4);

print(d,9);

}

void print(int* a, int n)

{ cout << "{" << a[0];

for (int i=1; i<n; i++)

cout << "," << a[i];

cout << "}\n";

}

int* append(int* a, int m, int* b, int n)

{

int * p= (int *)malloc(sizeof(int)*(m+n));

int i,index=0;

for(i=0;i<m;i++)

p[index++]=a[i];

for(i=0;i<n;i++)

p[index++]=b[i];

return p;

}

int* merge(int* a, int m, int* b, int n)

{

int i, j, k;

j = k = 0;

int *mergeRes = (int *)malloc(sizeof(int)*(m+n));

for (i = 0; i < m + n;) {

if (j < m && k < n) {

if (a[j] < b[k]) {

mergeRes[i] = a[j];

j++;

}

else {

mergeRes[i] = b[k];

k++;

}

i++;

}

// copying remaining elements from the b

else if (j == m) {

for (; i < m + n;) {

mergeRes[i] = b[k];

k++;

i++;

}

}

// copying remaining elements from the a

else {

for (; i < m + n;) {

mergeRes[i] = a[j];

j++;

i++;

}

}

}

return mergeRes;

}

The _______ allows you to quickly access features such as formatting, charts, tables, and totals

Answers

Answer:

The Quick Analysis toolbar allows you to quickly access features such as formatting, charts, tables, and totals

Where do you access the status report of an assigned task that is open?

on the Show command group of the Home tab
on the Update command group of the Review tab
on the Recurrence command group of the Insert tab
on the Manage Task command group of the Task tab

Answers

Answer:

d

Explanation:

Answer:

D

Explanation:

correct on edge

which of the following is used in python to execute statements multiple times? a. print b. for c. def d. input

Answers

To execute Python statements multiple times we use:

b. for.

In Python, the "for" statement is used to execute a block of code multiple times. It is often used with iterable objects such as lists, tuples, and dictionaries to loop through each element or key-value pair.

Example of using the "for" statement to execute a block of code multiple times:

for i in range(5):

   print(i)

This code will print the numbers 0 to 4 on separate lines, since the "range(5)" function generates a sequence of numbers from 0 up to (but not including) 5, and the "for" loop executes the indented block of code once for each number in the sequence.

To clarify the other options:

a. print: The "print" statement is used to display output on the screen, but it doesn't execute statements multiple times.

c. def: The "def" keyword is used to define a function, but it doesn't execute statements multiple times by itself.

d. input: The "input" function is used to get input from the user, but it doesn't execute statements multiple times.

Learn more about for loop here:

brainly.com/question/30494342

#SPJ4

Assume a 2^20 byte memory:

a) What are the lowest and highest addresses if memory is byte-addressable?

b) What are the lowest and highest addresses if memory is word-addressable, assuming a 16-bit word?

c) What are the lowest and highest addresses if memory is word-addressable, assuming a 32-bit word?

Answers

a) Lowest address: 0, Highest address: (2^20) - 1. b) Lowest address: 0, Highest address: ((2^20) / 2) - 1. c) Lowest address: 0, Highest address: ((2^20) / 4) - 1.

a) If memory is byte-addressable, the lowest address would be 0 and the highest address would be (2^20) - 1.

This is because each byte in the memory requires a unique address, and since there are 2^20 bytes in total, the highest address would be one less than the total number of bytes.

b) If memory is word-addressable with a 16-bit word, each word would consist of 2 bytes.

Therefore, the lowest address would be 0 (representing the first word), and the highest address would be ((2^20) / 2) - 1.

This is because the total number of words is equal to the total number of bytes divided by 2.

Subtracting 1 gives us the highest address, as the addresses are zero-based.

c) If memory is word-addressable with a 32-bit word, each word would consist of 4 bytes.

In this case, the lowest address would still be 0 (representing the first word), and the highest address would be ((2^20) / 4) - 1.

Similar to the previous case, the total number of words is equal to the total number of bytes divided by 4.

Subtracting 1 gives us the highest address.

For more questions on address

https://brainly.com/question/30273425

#SPJ8

what is the function of a head frame

Answers

Answer:

it is to enable the hoisting of machinery,personnel or materials.

Explanation:

which means it is use to raise materials during construction work

What is the most important trait of the first pilot project in the AI Transformation Playbook?

Answers

Answer:

Succeed and show traction within 6-10 months.

Explanation:

Ai (Artificial Inteliigence), also known as machine intelligence, is a branch of computer science that is specialized in making smart machines that are capable of doing human tasks

AI Transformation Playbook is a guide to use AI in enterprises successfully, written by Co-founder of Google Brain, Andrew Ng. In his guide, he unveiled the steps that can be followed to successfully installing AI in enterprises, companies, etc.

The most important trait of the first pilot projects is that it succeeds and begins to show traction within 6-10 months.

In his guide, he summarised five steps to install AI in enterprises. The first step is to 'Execute pilot projects to gain  momentum.'

The most important trait of beginning with AI projects is that it succeeds first before being most valuable projects. The success is important as it will help to achieve familiarity and will help other people of the company to invest in this project more.

This success begins to show tractions within 6-12 months of its success.

What are the 3 constraints for mineshaft headgear

Answers

The  3 constraints for mineshaft headgear

The ore, or metal often run out. There is issue of  Incompetence or faulty parts.Their structure can be complicated.What is Mine headgear constructions about?

Mine headgear constructions is known to be one that tends to aid the wheel method that is often used for suspending any kind of winding cables that moves workers and ore up as well as  down deep level shafts.

Note that the  The  3 constraints for mineshaft headgear

The ore, or metal often run out. There is issue of  Incompetence or faulty parts.Their structure can be complicated.

Learn more about mineshaft headgear from

https://brainly.com/question/24554365

#SPJ1

the following code segment is intended to do the following: when the mouse is pressed, a circle is created with a fill matching the color at the current index in app.colorlist. the code segment does not work as intended.

Answers

The change that can be made to the code segment produces the intended output is: The material in parenthesis in lines 1, 2, and 3 has to be enclose in quote marks.

An executable section of computer memory designated to a certain process is known as a process code segment. Segment for Process Code In order to compare a process code segment to an anticipated value, verification implements verification. The goal of the code segment is to print a value that is 1 greater than the value of n. System. The fetch, decode, execute cycle is the order in which a CPU runs code.

Learn more about code segment: https://brainly.com/question/30300695

#SPJ4

The author Darnell Littal belleves that "Beyond bad markets and economic news, the number one reason that mergers
fall is the absence of a well-understood

Answers

Answer:

human performance plan

Explanation:

(for odyssey users)

What are possible penalties if a designer is caught breaking copyright laws?

Select all that apply.


removing the design from internet
having a work computer confiscated
losing access to software programs
paying fines to copyright owner

Answers

Answer:

1 and 4 are the correct answers.

Explanation:

Which of the following techniques is a direct benefit of using Design Patterns? Please choose all that apply Design patterns help you write code faster by providing a clear idea of how to implement the design. Design patterns encourage more readible and maintainable code by following well-understood solutions. Design patterns provide a common language / vocabulary for programmers. Solutions using design patterns are easier to test

Answers

Answer:

Design patterns help you write code faster by providing a clear idea of how to implement the design

Explanation:

Design patterns help you write code faster by providing a clear idea of how to implement the design. These are basically patterns that have already be implemented by millions of dev teams all over the world and have been tested as efficient solutions to problems that tend to appear often. Using these allows you to simply focus on writing the code instead of having to spend time thinking about the problem and develop a solution. Instead, you simply follow the already developed design pattern and write the code to solve that problem that the design solves.

Fill in the blank: To keep your content calendar agile, it shouldn’t extend more than ___________.

two weeks

one month

three months

six month

Answers

To keep your content calendar agile, it shouldn’t extend more than three months.

Thus, A written schedule for when and where content will be published is known as a content calendar.

Maintaining a well-organized content marketing strategy is crucial since it protects you from last-minute crisis scenarios and enables you to consistently generate new material and calender agile.

As a result, after the additional three months, it was unable to maintain your content calendar's agility.

Thus, To keep your content calendar agile, it shouldn’t extend more than three months.

Learn more about Calendar, refer to the link:

https://brainly.com/question/4657906

#SPJ1

Define basic logical gates with its symbol, algebraic expression and truth table.​

Answers

Answer:

A truth table is a good way to show the function of a logic gate. It shows the output states for every possible combination of input states. The symbols 0 (false) and 1 (true) are usually used in truth tables. The example truth table shows the inputs and output of an AND gate.

Explanation:

working with the tkinter(python) library



make the window you create always appear on top of other windows. You can do this with lift() or root.attributes('-topmost', ...), but this does not apply to full-screen windows. What can i do?

Answers

To make a tkinter window always appear on top of other windows, including full-screen windows, you must use the wm_attributes method with the topmost attribute set to True.

How can I make a tkinter window always appear on top of other windows?

By using the wm_attributes method in tkinter and setting the topmost attribute to True, you can ensure that your tkinter window stays on top of other windows, even when they are in full-screen mode.

This attribute allows you to maintain the window's visibility and prominence regardless of the current state of other windows on your screen.

Read more about python

brainly.com/question/26497128

#SPJ1

What happens to the Menu Bar when the
object (image, shape, etc.) is "active"?

Answers

Answer: Ok so Sorry about this but I will answer thing at 10:20 tommorow I promise

Explanation:

PLEASE HURRY!!!
What is the output of the following program? Assume numA is 4, numB is 2, and numC is 6.

if numA < numB and numB < numC:
print(numA)
elif numB < numA and numB < numC:
print(numB)
else:
print(numC)

A) 2.0
B) numA
C) 4.0
D) numB

Answers

Answer: 2.0

Explanation: I did this on ed genuity , I’m terrible at this so I don’t really have an explanation

Answer:

A)2.0

Explanation:

You are probably inputting this into the wrong section of python. Most beginners of python(Including me) start out by going into a new untitled blank coding slate. This type of code isn't meant to go into the coding slate. This is meant to go into the python shell. Therefore if you put this into the coding slate, you won't get back a result at all because half of your functions are rendered useless.

What term is used to describe our connection with eachother through technology

Answers

Technology literacy refers to a familiarity with digital information and devices, increasingly essential in a modern learning environment.

Which of the following policy guidelines specifies the restrictions on user access
regarding access to read, write, execute, or delete permissions on the system?
Least privilege
Accountability
Default use
Specific duties

Answers

The policy guidelines that specifies such restrictions on user access can be referred to as: A. Least privilege.

What is the Least Privilege Principle?

The least privilege principle can be described as a concept in information security and policy guidelines that gives a user minimum permission or levels of access that they are needed to execute a tasks.

Therefore, the policy guidelines that specifies such restrictions on user access can be referred to as: A. Least privilege.

Learn more about least privilege on:

https://brainly.com/question/4365850

Use the drop-down menus to complete statements about how to use the database documenter

options for 2: Home crate external data database tools

options for 3: reports analyze relationships documentation

options for 5: end finish ok run

Use the drop-down menus to complete statements about how to use the database documenteroptions for 2:

Answers

To use the database documenter, follow these steps -

2: Select "Database Tools" from   the dropdown menu.3: Choose "Analyze"   from the dropdown menu.5: Click on   "OK" to run the documenter and generate the desired reports and documentation.

How is this so?

This is the suggested sequence of steps to use the database documenter based on the given options.

By selecting "Database Tools" (2), choosing "Analyze" (3), and clicking on "OK" (5), you can initiate the documenter and generate the desired reports and documentation. Following these steps will help you utilize the database documenter effectively and efficiently.

Learn more about database documenter at:

https://brainly.com/question/31450253

#SPJ1

what is the maximum file size supported by a file system with 20 direct blocks, single, double, and triple indirection? The block size is 1024 bytes. Disk block numbers can be stored in 4 bytes.

Answers

Answer:

We have, block size = 512

number of block numbers in an indirection block

= block size / 4

= 128

number of blocks for file data in that file object

= 16 + 128 + 128^2 + 128^3

Maximum file size:

(direct + single indirect + double indirect + triple indirect) * (blocksize)

= (16 + 512/4 + (512/4)^2 + (512/4)^3) * (512)

= 68853964800 bytes, ~64 gigs

Explanation:

Answer:

64 gigs

Explanation:

Ur mum!

What should you do when you are working on an unclassified system and receive a classified attachment?

Answers

If a classified attachment is sent to you while you are working on an unclassified system, call your security point of contact immediately.

What is the meaning of classified documents?

Material that a government agency deems to be sensitive information that needs to be protected is classified information. Laws and regulations limit access to specific groups of people with the required security clearance and need to know, and improper handling of the information can result in criminal penalties.

What is the meaning of unclassified information?

Official information that does not require the assignment of Confidential, Secret, or Top Secret markings but is not publicly-releasable without permission is classified as unclassified.

To know more about unclassified information, check out:

https://brainly.com/question/28302335

#SPJ1

What are 3 data Gathering method that you find effective in creating interactive design for product interface and justify your answer?

Answers

Answer:

In other words, you conducted the four fundamental activities that make up the interaction design process – establishing requirements, designing alternatives, prototyping designs, and evaluating prototypes.

Explanation:

Implement a Java program using simple console input & output and logical control structures such that the program prompts the user to enter 5 integer scores between 0 to 100 as inputs and does the following tasks For each input score, the program determines whether the corresponding score maps to a pass or a fail. If the input score is greater than or equal to 60, then it should print "Pass", otherwise, it should print "Fail". After the 5 integer scores have been entered, the program counts the total number of passes as well as the total number of failures and prints those 2 count values with appropriate messages like "Total number of passes is: " & "Total number of failures is: ". After the 5 integer scores have been entered, the program finds the highest score as well as the lowest score and prints those 2 values with appropriate messages like "Highest score is: " & "Lowest score is: ". The program checks whether an input score is a number between 0 - 100 or not. If the input score value is otherwise or outside the above range, then it prints the error message saying "Invalid score" and prompts the user for valid input.

Answers

Answer:

import java.util.Scanner; public class Main {    public static void main(String[] args) {        int pass = 0;        int fail = 0;        int highest = 0;        int lowest = 100;        int counter = 0;        Scanner input = new Scanner(System.in);        while(counter < 5){            System.out.print("Input a score between 0 to 100: ");            int score = input.nextInt();            while(score < 0 || score > 100){                System.out.println("Invalid score.");                System.out.print("Input a score between 0 to 100: ");                score = input.nextInt();            }            if(score >= 60 ){                System.out.println("Pass");                pass++;            }else{                System.out.println("Fail");                fail++;            }            if(highest < score ){                highest = score;            }            if(lowest > score){                lowest = score;            }            counter++;        }        System.out.println("Total number of passes is: " + pass);        System.out.println("Total number of failures is: " + fail);        System.out.println("Highest score is: " + highest);        System.out.println("Lowest score is: " + lowest);    } }

Explanation:

Firstly, declare the necessary variables and initialize them with zero (Line 4-8). Next create a Scanner object to get user input for score (Line 10). Create a while loop by using the counter as limit (Line 12). In the while loop, prompt user to input a number between 1 - 100 (Line 13-14). Create another while loop to check the input must be between 1 - 100 or it will print invalid message and ask for user input again (Line 15-19).

Next, create an if-else statement to check if the current score is equal or above 60. If so print pass if not print fail (Line 21-27). At the same time increment the fail and pass counter.

Create another two if statement to get the current highest and lowest score and assign them to highest and lowest variables, respectively (Line 29-35).

Increment the counter by one before proceeding to the next loop to repeat the same process (Line 37).

At last, print the required output after finishing the while loop (Line 40-43).

it is a group of two or more computer system connect to each other​

Answers

network is a group of two or more computer system connected together

A user clicks. such as option buttons and check boxes in a dialog box to provide information

Answers

Answer:

It's an input,

Consider the following classes.
public class Dog
{
/* code */
}

public class Dachshund extends Dog
{
/* code */
}
Assuming that each class has a default constructor, which of the following are valid declarations?

I. Dog sadie = new Dachshund();
II. Dachshund aldo = new Dachshund();
III. Dachshund doug = new Dog();

Group of answer choices

I only

II only

III only

I and II only

II and III only

Answers

Assuming that each class has a default constructor, Only I and II are valid declarations.

What is default constructor?

In object-oriented programming, a constructor is a special method that is called when an object is created. It initializes the object's data members and prepares the object for use.

Dog sadie = new Dachshund();

This is valid because Dachshund is a subclass of Dog, so a Dachshund object can be assigned to a Dog variable.

Dachshund aldo = new Dachshund();

This is also valid because it creates a Dachshund object and assigns it to a Dachshund variable.

Dachshund doug = new Dog();

This is not valid because a Dog object cannot be assigned to a Dachshund variable. While a Dachshund is a Dog, a Dog is not necessarily a Dachshund.

Thus, only I and II are valid declarations.

For more details regarding default constructor, visit:

https://brainly.com/question/31053149

#SPJ3

Other Questions
Which method of finding slope do you prefer? Why?(slope formula, table, other) What are the 4 insights learnt from the "Custom Mold Inc.", a circle with the radius of 3 cm has a segment with a central angle of 90. what is the area of the segment 1.Which of the following describes a protected turn? 5. Multilingguwalismo According to the theory of public choice, the employees of and employees of should act differently because? 3.2 Calculate the following from the information provided below:3.2.1 The selling price per unit that will enable the company to break even. (4 marks)The number of units that must be sold to earn a net profit of R1 196 800 if the selling priceincreases by R36 per unit and the variable costs increase by 10%.(5 marks)INFORMATIONThe following information was provided by Sabrina Limited for the only product that it manufactures:Fixed costs per annum R1 788 000Variable costs per unit R320Selling price per unit R680Expected sales 10 000 units During each hour of exercise, Matthew drinks 1 cups of water. Matthew exercised for 14 hours thismonth. How many cups of water did he drink while he was exercising this month?Im so bad with math please ask:(((( Calculate the percentage difference in the fundamental vibrational wavenumbers of 23Na35Cl and 23Na37Cl on the assumption that their force constants are the same. The mass of 23Na is 22.9898mu. at an outdoor concert you sit close to the stage and between two speakers. you find the sound to be surprisingly faint, and people just a few seats away can hear the music very well. what is the primary reason for this? at the beginning of each legislative session, the _______ reports to the legislature the total amount of revenues expected from current taxes and other sources. Pls Help Will Give Brainliest A carboxylase reaction by rubisco consumes ______ ATP, and an oxygenase reaction consumes ______ ATP. i've got a few math problems so..solve the systems by graphing:1. y=2x+13x+y=6 2. 2x+6y=12y=1/3x + 4 annual dividends of atta corp grew from $0.96 in 2005 to $1.76 in 2017. what was the annual growth rate? (round your answer to 2 decimal places.) Write a 200- to 400-word essay comparing and analyzing the two versions of the poem. structure your essay into an introduction, body, and conclusion, and make sure that it focuses on a controlling idea, or thesis statement. use textual evidence, including scansion, to support your ideas. A football player kicks a ball with a mass of .55 kg. The average acceleration of thefootball was 14.9 m/s2. How much force did the kicker supply to the football?8.2 NO 8.2 m/s35.24 N35.24 m/s2 In the same assignment what about hydrogen carbonate True/False. cumulative trauma disorders are psychological issues that workers face as a result of repetitively performing the same task for years. Of the different HR specialties that are available (list below), which is most appealing to you as a career? Choose one from the list, write about the challenges, opportunities, and other factors that may be associated with that part of HRM.Legal: EEO and Diversity ManagementStaffingTraining and DevelopmentEmployee RelationsLabor and Industrial RelationsCompensation and BenefitsSafety and SecurityEthics and Sustainability