Write a Java program to get the values stored in a four-by-five array of integers and store those values in a one-dimensional array referred by the name sorted1Darray . This array will have all the numbers in increasing order (remember the bubble sort!!) !

Answers

Answer 1

Answer:

done

Explanation:

int a[][] = new int[4][4];

Random r = new Random();

 

for(int i=0;i<4;i++)

for(int j=0;j<4;j++)

{

a[i][j]=r.nextInt()%100;

}

 

int sorted1Darray[] = new int [16];

int k=0;

 

for(int i=0;i<4;i++)

for(int j=0;j<4;j++)

sorted1Darray[k++]=a[i][j];

 

//now sorting using bubble sort

for(int i=0;i<16;i++)

for(int j=0;j<16;j++)

if(sorted1Darray[i]<sorted1Darray[j])

{

int t= sorted1Darray[i];

sorted1Darray[i]=sorted1Darray[j];

sorted1Darray[j]=t;

}

System.out.println("Sorted array:");

for(int i=0;i<16;i++)

System.out.print(sorted1Darray[i]+" ");

System.out.println();


Related Questions

g Write a C program that prompts the user for a string of, up to 50, characters and numbers. It can accept white spaces and tabs and end with a return. The program should keep track of the number of different vowels (a,e, i, o, u) and the number of digits (0, 1, 2, 3, 4, 5, 6, 7, 8,9). The program should output the number of occurrences of each vowel and the number of occurrences of all digits.

Answers

Answer:

Following are the code to this question:

#include <stdio.h> //defining header file

#include <string.h>//defining header file

int main()//defining main method

{

char name[50]; //defining character variable

int A=0,E=0,I=0,O=0,U=0,value=0,i,l; //defining integer variables

printf("Enter string value: ");//print message

gets(name);//input value by gets method

l=strlen(name);//defining l variable to store string length

for(i=0; i<50; i++) //defining loop to count vowels value

{

if(name[i] == 'A' || name[i] == 'a') //defining if condition count A value A++;//increment value by 1

else if(name[i] == 'E' || name[i] == 'e')//defining else if condition count E value

E++;//increment value by 1

else if(name[i] == 'I' || name[i] == 'i') //defining else if condition count I value

I++;//increment value by 1

else if(name[i] == 'O' || name[i]== 'o') //defining else if condition count O value

O++;//increment value by 1

else if(name[i] == 'U' || name[i] == 'u')//defining else if condition count U value

U++;//increment value by 1

else if(name[i]>= '0' && name[i] <= '9')//defining else if condition count digits value

value++;//increment value by 1 }

printf("A: %d\n",A);//print A value

printf("E: %d\n",E); //print E value

printf("I: %d\n",I);//print I value

printf("O: %d\n",O);//print O value

printf("U: %d\n",U);//print U value

printf("value: %d",value);//print digits value

return 0;

}

Output:

please find the attachment.

Explanation:

In the above code, a char array "name" and integer variables "A, E, I, O, U, i, value and l" declared, in which name array store 50 character value, which uses the gets function to take string value.after input value strlen method is used to store the length of the input string in l variable.In the next step, for loop is declared that uses multiple conditional statements to counts vowels and the values of the digits,if it is more then one it increments its value and at the last print method is used to print its count's value.

Write down the information for your system’s active network connection (most likely either Ethernet or Wi-Fi).

Answers

Question:

1. Open a command prompt window, type ipconfig/ all and press Enter.

2. Write down the information for your system’s active network connection(most likely either Ethernet or Wi-Fi).

* Physical address in paired hexadecimal form.

* Physical address expressed in binary form.

Answer:

00000000 11111111 00000011 10111110 10001100 11011010

Explanation:

(i)First, open a command prompt window by using the shortcut: Windows key + X then select command prompt in the list.

(ii)Now type ipconfig/ all and press Enter. This will return a few information

(a) To get the Physical address in paired hexadecimal form, copy any of the Physical Addresses shown. E.g

00-FF-03-BE-8C-DA

This is the hexadecimal form of the physical address.

(b) Now let's convert the physical address into its binary form as follows;

To convert to binary from hexadecimal, we can use the following table;

Hex                 |         Decimal                |           Binary

0                      |          0                           |           0000

1                       |          1                            |           0001

2                      |          2                           |           0010

3                      |          3                           |           0011

4                      |          4                           |           0100

5                      |          5                           |           0101

6                      |          6                           |           0110

7                      |          7                           |           0111

8                      |          8                           |           1000

9                      |          9                           |           1001

A                     |          10                           |           1010

B                      |          11                           |           1011

C                      |          12                           |           1100

D                      |          13                           |           1101

E                      |          14                           |           1110

F                      |          15                           |           1111

Now, from the table;

0 = 0000

0 = 0000

F = 1111

F = 1111

0 = 0000

3 = 0011

B = 1011

E = 1110

8 = 1000

C = 1100

D = 1101

A = 1010

Put together, 00-FF-03-BE-8C-DA becomes;

00000000 11111111 00000011 10111110 10001100 11011010

PS: Please make sure there is a space between ipconfig/ and all

Write a program that create Employee class with fields id,name and sal and create Employee object and store data and display that data.

Answers

Answer:

Here is the C++ program for Employee class with fields id,name and sal.

#include <iostream>  // to use input output functions

#include <string>  //to manipulate and use strings

using namespace std;   // to access objects like cin cout

class Employee {  //class Employee

private:  

/* the following data members are declared as private which means they can only be accessed by the functions within Employee class */

  string name;  //name field

  int id; //id field

  double sal;   //salary field

public:    

  Employee();  // constructor that initializes an object when it is created

/* setName, setID and setSalary are the mutators which are the methods used to change data members. This means they set the values of a private fields i.e. name, id and sal */

  void setName(string n)  //mutator for name field

     { name = n; }        

  void setId(int i)  //mutator for id field

     { id = i; }        

  void setSalary(double d)  //mutator for sal field

     { sal = d; }  

/* getName, getID and getSalary are the accessors which are the methods used to read data members. This means they get or access the values of a private fields i.e. name, id and sal */

  string getName()  //accessor for name field

     { return name; }        

  int getId()  //accessor for id field

     { return id; }        

  double getSalary()  //accessor for sal field

     { return sal; }  };  

Employee::Employee() {  //default constructor where the fields are initialized

  name = "";  // name field initialized

  id = 0;  // id field initialized to 0

  sal = 0;   }   // sal field initialized to 0

void display(Employee);  

// prototype of the method display() to display the data of Employee

int main() {  //start of the main() function body

  Employee emp;  //creates an object emp of Employee class

/*set the name field to Abc Xyz which means set the value of Employee class name field to Abc Xyz  through setName() method and object emp */

  emp.setName("Abc Xyz");  

/*set the id field to 1234 which means set the value of Employee class id field to 1234  through setId() method and object emp */

  emp.setId(1234);

/*set the sal field to 1000 which means set the value of Employee class sal field to 1000  through setSalary() method and object emp */

  emp.setSalary(1000);    

  display(emp);  }   //calls display() method to display the Employee data

void display(Employee e) {  // this method displays the data in the Employee //class object passed as a parameter.

/*displays the name of the Employee . This name is read or accessed through accessor method getName() and object e of Employee class */

  cout << "Name: " << e.getName() << endl;  

/*displays the id of the Employee . This id is read or accessed by accessor method getId() and object e */

  cout << "ID: " << e.getId() << endl;

/*displays the salary of the Employee . This sal field is read or accessed by accessor method getSalary() and object e */

  cout << "Salary: " << e.getSalary() << endl;  }

Explanation:

The program is well explained in the comments mentioned with each statement of the program.

The program has a class Employee which has private data members id, name and sal, a simple default constructor Employee(), mutatator methods setName, setId and setSalary to set the fields, acccessor method getName, getId and getSalary to get the fields values.

A function display( ) is used to display the Employee data i.e. name id and salary of Employee.

main() has an object emp of Employee class in order to use data fields and access functions defined in Employee class.

The output of the program is:

Name: Abc Xyz                                                                                                      

ID: 1234                                                                                                                  

Salary: 1000

The program and its output are attached.

I have tried looking for this answer everywhere, and I could not find the answer

I have a Windows 10 Laptop, with a 12GB RAM Card, okay? I also have my 1TB Disk Partitioned so that I have 3 Disks. 2 of them are my primary, both of those are 450GB apiece. The last one ([tex]Z:[/tex]) I named "RAM" and set that one to 100GB.

How do I turn the drive [tex]Z:[/tex] into strictly RAM?
I already did the Virtual Memory part of it, but I was wondering if I can make it strictly RAM so the system uses drive [tex]Z:[/tex] before using the RAM disk? If it is not possible, I'm sorry.

Answers

If my computer has 4 gigabytes of ram memory then I have 4e+9 bytes of memory.  I think-

Answer: That isn't a software problem, its a hardware problem. There is a difference between 12gb of ram versus 100 gb of HDD. Ram is temporary storage, you can not turn SSD or HDD storage into RAM. If you are a gamer, STEER AWAY FROM LAPTOPS, DO NOT BUY A GAMING LAPTOP. Either buy a DESKTOP (or build) or a console. They give more performance for the price and they are easily upgradable. Not many people can open up a laptop and put in more RAM because the hardware is incredibly small.

What would be suggested way to share and sustain knowledge with members in a team ?
A) Sharing of best practices and lessons learnt through emails
B) Sharing knowledge through knowledge sharing sessions
C) Sharing knowledge through informal conversations, for example, during lunch breaks.
D) Sharing best practices, lessons learnt and other topics in a central place where team can collaborate

Answers

Answer: D) Sharing best practices, lessons learned and other topics in a central place where the team can collaborate

Explanation: Knowledge sharing within a team is usually an important aspect of building a strong and efficient team. Acquiring knowledge usually comes from the experience gathered from previous projects, learning, or tips learned from various sources. Therefore, sharing knowledge is always a good way to ensure that what is gained is sustained by letting others know. Sharing and sustaining knowledge is most effective when transmitted or aired to a group of people usually a team gathered in an interactive setting which allows members to freely share experience and get feedback, views, or thoughts from other collaborators.

What are the differences between editing manually and editing digitally? What tools are used for each?

Answers

Answer:

Both manual and digital editing are concepts used in proofreading.

Manual editing is also called "hard proofreading" (or "hard proofing" for short). It is the process of proofreading, modifying or revising printed documents. In this type of proofreading, one would normally manually mark parts of the printed documents with editing materials such as ink, pen, marker e.t.c

Digital editing is also called "soft proofing". In contrast to manual editing, this type is done on digital documents. These documents include, but not limited to, DOC, txt, PDF, image, audio and video files.

Tools for editing manually are;

i. pen

ii. ink

iii. tipex

Tools for editing digitally are;

i. Photoshop application

ii. Text editors such as notepad++, Microsoft word

Proofreading has evolved in recent times as a result of advancements in technology. Now, manual proofreading has paved way for digital proofreading, which allows revising of PDF and  DOC files. The difference in both forms is as follows:

Manual Editing: In the process of revising or proofing printed documents, one would manually apply standard proofreading marks. Manual editing is also known as "Hard proofing", as the process requires proofreaders to mark the hard copies.

Digital Editing: In the process of revising or proofing digital documents i.e. PDF and DOC files, one would digitally apply the proofreading marks. Thus, corrections and edits are transferred electronically among authors, proofreaders. Digital editing is also known as "Soft proofing", as the process requires proofreaders to mark the soft copies i.e. without using any paper or pen.

There are a number of electronic tools and marks available for both techniques of

proofreading. Some tools used for manual proofreading include- deletion, capitalization, and  insertion, close-up, transpose.

Tools used in digital proofreading include- spell check, readability levels, trite expressions,  and comment, track changes.

Learn More: https://brainly.com/question/10002469

Your smartphone, digital camera, and printer are all part of a network in your workspace. What type of network is likely in use

Answers

Answer:

PAN

Explanation:

PAN, short form of Personal Area Network, is a type of computer network built for personal use typically within a building. This could be inside a small office or a bedroom in a residence. This type of network basically consists of one or more personal computers, digital camera, printer, Tv, scanner, telephones, peripheral devices, video games console, and other similar devices.

It is pretty much simple to set up and allow for great flexibility. In this network, a single modem can be set up to enable both wired and wireless connections for multiple devices within the building.

A customer contacts the help disk stating a laptop does not remain charged for more than 30 minutes and will not charge more than 15%. Which of the following components are the MOST likely causes the issue? (Select three.) A. LCD power inverter B. AC adapter C. Battery D. Processor E. VGA card F. Motherboard G. Backlit keyboard H. Wireless antenna

Answers

Answer:

A. LCD power inverter

B. AC adapter

C. Battery

Problem You Need to Solve for This Lab:

You are asked to write an app to keep track of a relatively small music library. The app should load song information from a data file once the app is started. It should allow user to view, add, remove, and search for songs. The app should save the data back to the same data file when the program exits.

What Your Program Should Do:

Write an interactive text based menu interface (using a loop) that will allow the user to

ï‚· Enter information for a new song

ï‚· Display information for all the songs in the database with index for each song

ï‚· Remove a song by index

ï‚· Search for songs by a certain artist

ï‚· Search for songs by a certain album

ï‚· Quit

For each song, you need to keep track of:

title

artist

duration

album

Allow the program to keep looping until user wants to quit. When the program starts, it should load the tasks from external file ("songs.txt") into memory. When user enters information about the new song, the program needs to read them in, save them in memory and eventually write them to the external data file ("songs.txt"). The file format could look like:

Stereo Hearts;Gym Class Heroes;3;34;The Papercut Chronicles II
Counting Stars;OneRepulic;4;17;Native
The ';' is used as a delimiter or field separator. Each record ends with a new line character.

Some Implementation Requirements:

Write at least four functions WITH arguments for this assignment.

Use struct named Song to model each song

Use array of structs to model the collection of songs.

Hint: In this assignment, some data fields may have multiple words in it. Therefore,

you now SHOULD read using the 3 argument version of get.

Watch out. When using the 3 argument version of get you need to make sure to

remove the delimiter or newline. Therefore, anytime you read (even a confirmation

message), make sure to eat the newline using cin.ignore(...)!

Make sure to have a delimiter written between each item in the file – like a newline.

This will be important when you read the information back from the file.

For submission, your data file should contain a sufficient set of test data. It should have test cases for same artist with multiple songs and same album with multiple songs in it.

Do-Not List:

No Global Variables (you can have global constants)

Do not use Classes or Linked Lists

You must use cstring and char arrays. (do not use )

No use of the stdio library (use iostream and fstream)

Instead of the string class, you will be using arrays of characters and the cstring library

No STL containers such as vector. You must implement your own array for this class.

Answers

Answer:

Write questions properly

Explanation:

Then it is easy to say answer

All of the following are examples of being computer literate, EXCEPT ________. knowing how to use the web efficiently knowing how to build and program computers knowing how to avoid hackers and viruses knowing how to maintain and troubleshoot your computer

Answers

Answer:knowing how to build and program computers.

Explanation:

When preparing a photo for a magazine, a graphic designer would most likely need to use a program such as Microsoft Excel to keep track of magazine sales. Microsoft Word to write an article about the photo. Adobe Photoshop to manipulate the photo. Autodesk Maya to create 3-D images that match the photo.

Answers

Answer:

Adobe Photoshop To Manipulate The Photo.

Explanation:

BLACKPINKS new album is amazing OMG I LOVE Lovesick Girls!!!

ICMP
(a) is required to solve the NAT traversal problem
(b) is used in Traceroute
(c) has a new version for IPv6
(d) is used by Ping

Answers

Answer:

(b) is used in Traceroute

(d) is used by Ping

Explanation:

ICMP is the short form of Internet Control Message Protocol. It is a protocol used by networking devices such as routers to perform network diagnostics and management. Since it is a messaging protocol, it is used for sending network error messages and operations information. A typical message could be;

i. Requested service is not available

ii. Host could not be reached

ICMP does not use ports. Rather it uses types and codes. Some of the most common types are echo request and echo reply.

Traceroute - which is a diagnostic tool - uses some messages available in ICMP (such as Time Exceeded) to trace a network route.

Ping - which is an administrative tool for identifying whether a host is reachable or not - also uses ICMP. The ping sends ICMP echo request packets to the host and then waits for an ICMP echo reply from the host.

ICMP is not required to solve NAT traversal problem neither does it have a new version in IPV6.

You are in a rectangular maze organized in the form of M N cells/locations. You are starting at the upper left corner (grid location: (1; 1)) and you want to go to the lower right corner (grid location: (M;N)). From any location, you can move either to the right or to the bottom, or go diagonal. I.e., from (i; j) you can move to (i; j + 1) or (i + 1; j) or to (i+1; j +1). Cost of moving right or down is 2, while the cost of moving diagonally is 3. The grid has several cells that contain diamonds of whose value lies between 1 and 10. I.e, if you land in such cells you earn an amount that is equal to the value of the diamond in the cell. Your objective is to go from the start corner to the destination corner. Your prot along a path is the total value of the diamonds you picked minus the sum of the all the costs incurred along the path. Your goal is to nd a path that maximizes the prot. Write a dynamic programming algorithm to address the problem. Your algorithm must take a 2-d array representing the maze as input and outputs the maximum possible prot. Your algorithm need not output the path that gives the maximum possible prot. First write the recurrence relation to capture the maximum prot, explain the correctness of the recurrence relation. Design an algorithm based on the recurrence relation. State and derive the time bound of the algorithm. Your algorithm should not use recursion

Answers

Answer:

Following are the description of the given points:

Explanation:

A) The Multiple greedy approaches could exist, which could be to reach for the closest emergency diamond, and yet clearly we are going to miss some very essential routes in that case. So, it can make every argument quickly, and seek to demonstrate a reference case for that.

B) An approach to the evolutionary algorithm and its users are going to just have states M x N. But each state (i, j) indicates the absolute difference between the amount of the selected diamond and the amounts of the costs incurred.

DP(i, j) = DimondVal(i, j) + max ((DP(i, j-1)-2), (DP(i-1,j-1)-3))

DP(i, j) is a description of the state.

DimondVal(i, j) is the diamond value at (i j), 0 if there is no diamond available.

This states must calculate the states of M N  and it involves continuous-time for each State to determine. Therefore the amount of time of such an algo is going to be O(MN).

What's the value of this Python expression? ((10 >= 5*2) and (10 <= 5*2))

Answers

Answer:

1 (true)

Explanation:

10 == 10 is valid=> 10 >= 10 is valid => 10 >=(5*2) is valid

10 == 10 is valid=> 10 <= 10 is valid => 10 <=(5*2) is valid

=>  ((10 >= 5*2) and (10 <= 5*2)) is valid => Return 1 or True

How many times will the while loop that follows be executed? var months = 5; var i = 1; while (i < months) { futureValue = futureValue * (1 + monthlyInterestRate); i = i+1; }
a. 5
b. 4
c. 6
d. 0

Answers

Answer:

I believe it is A

Explanation:

What is the difference between requirements and controls in the security process? Give examples of each.

Answers

Answer:

Security controls are those measures taken to prevent, identify, counteract, and reduce security risks to computer systems, whereas, Security Requirements are guidelines or frameworks that stipulates measures to ensure security control.

Explanation:

Security controls encompass all the proactive measures taken to prevent a breach of the computer system by attackers. Security requirements are those security principles that need to be attained by a system before it can be certified as safe to use.

Security controls are of three types namely, management, operational, and technical controls. Examples of technical controls are firewalls and user authentication systems. A statement like 'The system shall apply load balancing', is a security requirement with an emphasis on availability.

A security analyst is performing a BIA. The analyst notes that in a disaster, failover systems must be up and running within 30 minutes. The failover systems must use back up data that is no older than one hour. Which of the following should the analyst include in the business continuity plan?
A. A maximum MTTR of 30 minutes
B. A maximum MTBF of 30 minutes
C. A maximum RTO of 60 minutes
D. An SLA guarantee of 60 minutes

Answers

Answer:

D.  A maximum RPO of 60 minutes

Explanation:

Note that an option is not included in this list of options.

The complete list of options is:

A. A maximum MTTR of 30 minutes

B. A maximum MTBF of 30 minutes

C. A maximum RTO of 60 minutes

D.  A maximum RPO of 60 minutes

E. An SLA guarantee of 60 minutes

The Recovery Point Objective tells how old a backup file must be before it can be  recovered by a system after failure.

Since the data in the failover systems described in this question must be backup and recovered after the failure, it will be important to include the Recovery Point Objective (RPO) in the Business Continuity Plan.

Since the failover systems must use back up data that is no older than one hour, the backup of the system data must be done at intervals of 60 minutes or less. Meaning that the maximum RPO is 60 minutes.

Note that RPO is more critical than RTO in data backup

#Write a function called random_marks. random_marks should #take three parameters, all integers. It should return a #string. # #The first parameter represents how many apostrophes should #be in the string. The second parameter represents how many #quotation marks should be in the string. The third #parameter represents how many apostrophe-quotation mark #pairs should be in the string. # #For example, random_marks(3, 2, 3) would return this #string: #'''""'"'"'" # #Note that there are three apostrophes, then two quotation #marks, then three '" pairs. #Add your function here!

Answers

Answer:

def random_marks(apostrophe, quotation, apostrophe_quotation):

   return "'"*apostrophe + "\""*quotation + "'\""*apostrophe_quotation

   

print(random_marks(3, 2, 3))

Explanation:

Create a function called random_marks that takes apostrophe, quotation, and apostrophe_quotation as parameters. Inside the function, return apostrophe sign times apostrophe plus quotation mark times quotation plus apostrophe sign quotation mark times apostrophe_quotation.

Note that plus sign (+) is used to concatenate strings. Also, if you multiply a string with a number, you get that number of strings ("#"*3 gives ###).

Then, call the function with given parameters and print

What are the pros and cons of using a linked implementation of a sparse matrix, as opposed to an array-based implementation?

Answers

Answer:

Linked lists and arrays are both linear data structures but while an array is a collection of items that can be accessed randomly, a linked list can be accessed sequentially.

A sparse matrix contains very few non-zero elements. For example;

_                        _

|  0   0   3  0  6    |

|   0   5   0  0  4   |

|   2   0   0  0  0   |

|_ 0   0   0  0  0 _|

In the implementation of a sparse matrix, the following are some of the pros and cons of using a linked list over an array;

PROS

i.  Linked lists are dynamic in nature and are readily flexible - they can expand and contract without having to allocate and/or de-allocated memory compared to an array where an initial size might need to be set and controlled almost manually. This makes it easy to store and remove elements from the sparse matrix.

ii. No memory wastage. Since the size of a linked list can grow or shrink at run time, there's no memory wastage as it adjusts depending on the number of items it wants to store. This is in contrast with arrays where you might have unallocated slots. Also, because the zeros of the sparse matrix need not be stored when using linked lists, memory is greatly conserved.

CONS

i. One of the biggest cons of linked lists is the difficulty in traversing items. With arrays, this is just of an order of 0(1) since the only requirement is the index of the item. With linked lists, traversal is sequential which means slow access time.

ii. Storage is another bottle neck when using linked lists in sparse matrix implementation. Each node item in a linked list contains other information that needs to be stored alongside the value such as the pointer to the next or previous item.

A technician is evaluating malware that was found on the enterprise network. After reviewing samples of the malware binaries, the technician finds each has a different hash associated with it. Which of the following types of malware is MOST likely present in the environment?

a. Trojan
b. Polymorphic worm
c. Rootkit
d. Logic bomb
e. Armored virus

Answers

Answer:

(b) polymorphic worm

Explanation:

A polymorphic worm can be compared with a chameleon. It changes its color so as to blend with the background of the surrounding to avoid being seen or caught. A polymorphic worm is a special type of worm that keeps changing its constituent features in order to avoid being detected. The most common way in which polymorphic worms hide their codes is by using encryption.

Polymorphic worms have two parts: the part that changes and the one that does not change. The part that changes include the characteristics of the worm such as encryption key, associated hash value e.t.c. The part that does not change is basically its functionality. Therefore, although the characteristics of the worm keep changing, its overall function remains the same.

Write code to create a list of numbers from 0 to 67 and assign that list to the variable nums. Do not hard code the list. Save & RunLoad HistoryShow CodeLens

Answers

Answer:

The program written in Python is as follows

nums = []

for i in range(0,68):

-->nums.append(i)

print(nums)

Explanation:

Please note that --> is used to denote indentation

The first line creates an empty list

nums = []

This line creates an iteration from 0 to 67, using iterating variable i

for i in range(0,68):

This line saves the current value of variable i into the empty list

nums.append(i)

At this point, the list has been completely filled with 0 to 67

This line prints the list

print(nums)

k- Add the code to define a variable of type 'double', with the name 'cuboidVolume'. Calculate the volume of the cuboid and set this variable value.

Answers

Answer:

Here is the JAVA program to calculate volume of cuboid:

import java.util.Scanner; // Scanner class is used to take input from user

public class CuboidVol { // class to calculate volume of cuboid

public static void main(String[] args) { // start of main() function body

Scanner input= new Scanner(System.in); //create Scanner class object

// prompts user to enter length of cuboid

System.out.println("Enter the cuboid length:");

double length=input.nextDouble(); //reads the input length value from user

// prompts user to enter width of cuboid

System.out.println("Enter the cuboid width:");

double width=input.nextDouble(); //reads the input width from user

// prompts user to enter height of cuboid

System.out.println("Enter the cuboid height:");

double height=input.nextDouble(); //reads the input height from user

/* the following formula is to calculate volume of a cuboid by multiplying its length width and height and a double type variable cuboidVolume is defined to store the value of the resultant volume to it */

double  cuboidVolume= length*width*height; //calculates cuboid volume

//displays volume of cuboid and result is displayed up to 2 decimal places

System.out.printf("Volume of the cuboid (length " + length + "/ height " + height + "/ width" +width +" is: " + "%.2f",cuboidVolume);   } }

Explanation:

The formula for the volume of a cuboid is as following:

Volume = Length × Width ×  Height

So in order to calculate the volume of cuboid three variable are required for length, width and height and one more variable cuboidVolume to hold the resultant volume of the cuboid.

The program is well explained in the comments added to each statement of the program. The program prompts the user to enter the value of height width and length of cuboid and the nextDouble() method is used to take the double type input values of height length and width. Then the program declares a double type variable cuboidVolume to hold the result of the volume of cuboid. Then the last printf statement is used to display the volume of cuboid in the format format "Volume of the cuboid (length  / height  / width ) is" and the result is displayed up to 2 decimal places.

The screenshot of the program along with its output is attached.

24. Which of the following statements about Emergency Support Functions (ESFs) is correct?
O A. ESFs are not exclusively federal coordinating mechanism
O B. ESFs are only a state or local coordinating mechanism
O C. ESFs are exclusively a federal coordinating mechanism
O D. ESFs are exclusively a state coordinating mechanism

Answers

(ESFs) is correct: ESFs are not exclusively federal coordinating mechanism.

The main path of the Internet along which data travels the fastest is known as the Internet ________. Group of answer choices

Answers

Answer:

Internet backbone

Explanation:

The internet backbone is made up of multiple networks from multiple users. It is the central data route between interconnected computer networks and core routers of the Internet on the large scale. This backbone does not have a unique central control or policies, and is hosted by big government, research and academic institutes, commercial organisations etc. Although it is governed by the principle of settlement-free peering, in which providers privately negotiate interconnection agreements, moves have been made to ensure that no particular internet backbone provider grows too large as to dominate the backbone market.

12. Kelly would like to know the average bonus multiplier for the employees. In cell C11, create a formula using the AVERAGE function to find the average bonus multiplier (C7:C10).

Answers

Answer:

1. Divide each bonus by regular bonus apply this to all the data

2. In cell C11 write, "Average" press tab key on the keyboard and then select the range of the cells either by typing "C7:C10" or by selecting it through the mouse.

Explanation:

The average bonus multiplier can be found by dividing each bonus with the regular bonus applying this to all the data and then putting the average formula and applying it to the cells C7:C10.  

After dividing the bonus with regular bonus, in cell C11 write, "Average" press tab key on the keyboard and then select the range of the cells either by typing "C7:C10" or by selecting it through the mouse.

Your boss wants you to start making your own Ethernet cables to save the company money. What type of connectors will you need to order to make them?

Answers

Answer:

Bulk Ethernet Cable - Category 5e or CAT5e

Bulk RJ45 Crimpable Connectors for CAT-5e

Explanation:

differentiate between web site and web application?

Answers

Explanation:

A website is a group of globally accessible into linked pages which have a single domain name. A web application is a software or program is is accessible using any web browser.

Answer:

Explanation:

A website shows static or dynamic data that is predominantly sent from the server to the user only, whereas a web application serves dynamic data with full two way interaction.

Define a function ComputeGasVolume that returns the volume of a gas given parameters pressure, temperature, and moles. Use the gas equation PV = nRT, where P is pressure in Pascals, V is volume in cubic meters, n is number of moles, R is the gas constant 8.3144621 ( J / (mol*K)), and T is temperature in Kelvin.Sample program:#include const double GAS_CONST = 8.3144621;int main(void) { double gasPressure = 0.0; double gasMoles = 0.0; double gasTemperature = 0.0; double gasVolume = 0.0; gasPressure = 100; gasMoles = 1 ; gasTemperature = 273; gasVolume = ComputeGasVolume(gasPressure, gasTemperature, gasMoles); printf("Gas volume: %lf m^3\n", gasVolume); return 0;}

Answers

Answer:

double ComputeGasVolume(double pressure, double temperature, double moles){

   double volume = moles*GAS_CONST*temperature/pressure;

    return volume;        

}

Explanation:

You may insert this function just before your main function.

Create a function called ComputeGasVolume that takes three parameters, pressure, temperature, and moles

Using the given formula, PV = nRT, calculate the volume (V = nRT/P), and return it.

The advantage of returning a structure type from a function when compared to returning a fundamental type is that

Answers

Answer:

The function can return multiple values and the function can return an object

Explanation:

The advantage of returning a structure type from a function when compared to returning a fundamental type is that the function can return multiple values and also the function can return an object

A function in a structure can be passed to a function from any other function or from the main function itself and the definition of a structure can be seen in the function where it is found

Distinguish among packet filtering firewalls, stateful inspection firewalls, and proxy firewalls. A thorough answer will require at least a paragraph for each type of firewall.
Acme Corporation wants to be sure employees surfing the web aren't victimized through drive-by downloads. Which type of firewall should Acme use? Explain why your answer is correct.

Answers

Answer:

packet filtering

Explanation:

We can use a packet filtering firewall, for something like this, reasons because when visiting a site these types of firewalls should block all incoming traffic and analyze each packet, before sending it to the user. So if the packet is coming from a malicious origin, we can then drop that packet and be on our day ;D

Other Questions
Consumers have become more selective and better informed about their purchases. This macro-environmental force strongly impacts this industry.a. Trueb. False The total area under the standard normal curve to the left of zequalsnegative 1 or to the right of zequals1 is Match each power with the branch of US government that wields it.Executive BranchOther Branches The animation demonstrates several traits that are characteristic of the primate order. In particular, it shows how primates have several features that enhance their vision and their sense of touch and dexterity. These characteristics make primates particularly well adapted to what type of environment? Evaluate. Write your answer as a fraction or whole number without exponents. 1/10^-3 = what is the simplest form of this expression 2(w-1) +(-2)(2w+1) mention two similarities of citizen and aliens what is the composting of the earth's crust How should you solve the equation x divided by 15 equals 60? What is the resulting equivalent equation? Choose the correct answer below. A. Divide each side by 15. Then simplify. B. Divide each side by 60. Then simplify. C. Multiply each side by 15. Then simplify. D. Multiply each side by x. Then simplify. E. Divide each side by x. Then simplify. F. Multiply each side by 60. Then simplify. The resulting equivalent equation is x= Match the solution set given in inequality notation with the solution set given in interval notation. 1. In a Millikan type experiment, two horizontal plates are 2.5 cm apart. A latex sphere ofmass 1.5 x 10-15 kg remains stationary when the potential difference between theplates is 460 V, with the upper plate positive. [2+2+2+2 = 8 marks]a. Is the sphere charged negatively or positively?b. What is the magnitude of the electric field intensity between the plates?C. Calculate the magnitude of the charge on the latex sphere.d. How many excess or deficit electrons does the sphere have? HELPPPPPPP ASAAPPPPP!!!! SPANISH 3!!!! f em deus o que salva uma pessoa e no as boas obras que ela praticou Beth Corbin's regular hourly wage rate is $14, and she receives an hourly rate of $21 for work in excess of 40 hours. During a January pay period, Beth works 50 hours. Beth's federal income tax withholding is $98, she has no voluntary deductions, and the FICA tax rate is 7.65%. Use January 15 for the end of the pay period and the payment date.Prepare the journal entries to record: a. Beth's pay for the period. b. The payment of Beth's wages. The main path of the Internet along which data travels the fastest is known as the Internet ________. Group of answer choices Which of the following best states one effect of advertising?O A. Market research becomes more accurate.B. Consumer behavior is influenced.C. Stockholders have a high level of utility.OD. Media revenues exceed costs. If fx=-4x2-3 please evaluate for f(8), listing the steps you take in order with their result. Find the inverse function f-1(x) Which set of ordered pairs is not a function?OA) (4, -2), (-2, 2), (2, -2), (4, 2)OB, (-4, 2), (-2, 2), (2, 2), (4, 2)OC) (-4, 2), (-2,-2), (2, 2), (4,2)OD) (-4,-2), (-2,-2), (2, 2), (4,2) the picture is the question Which steps would be used to solve the equation? Check all that apply. 2 and two-thirds + r = 8 Subtract 2 and two-thirds from both sides of the equation. Add 2 and two-thirds to both sides of the equation. 8 minus 2 and two-thirds = 5 and one-third 8 + 2 and two-thirds = 10 and two-thirds Substitute the value for r to check the solution.