1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Stolb23 [73]
2 years ago
14

A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of

the privacy, (non-)static, return datatype, method name, and formal parameters. Consider the ceiling method as an example.
public static int ceiling (double num)
{
return num <= 0 ? (int) num: (int) num + 1;
}
The method signature of the ceiling method is the first line of the method: public static int ceiling (double num). In this example, we note that ceiling is static because it is a standalone method and does not require an object to invoke (since we are not acting on an instance of a class).
For parts a - d, give the method signature described by the scenario.
a) A method in class String that returns the reversed version of the current String.
b) A method that returns the maximum of two given integers.
c) A method that returns true or false if the input integer is an even number.
d) A default constructor for class Table.
Computers and Technology
1 answer:
Bess [88]2 years ago
8 0
To be honest I feel like it’s B that’s looks and seems the most correct to me
You might be interested in
If a surface is. it is exactly vertical
Jobisdone [24]
What are the choices
8 0
3 years ago
To copy and paste the image in MS Word the dash option is used​
Stells [14]

<em>ur</em><em> </em><em>answer</em><em> </em><em>hope</em><em> </em><em>this</em><em> </em><em>will</em><em> </em><em>helps</em><em> </em><em>u</em><em /><em /><em /><em /><em />

5 0
2 years ago
A datagram network allows routers to drop packets whenever they need to. The probability of a router discarding a packetis p. Co
tresset_1 [31]

Answer:

a.) k² - 3k + 3

b.) 1/(1 - k)²

c.) k^{2}  - 3k + 3 * \frac{1}{(1 - k)^{2} }\\\\= \frac{k^{2} - 3k + 3 }{(1-k)^{2} }

Explanation:

a.) A packet can make 1,2 or 3 hops

probability of 1 hop = k  ...(1)

probability of 2 hops = k(1-k)  ...(2)

probability of 3 hops = (1-k)²...(3)

Average number of probabilities = (1 x prob. of 1 hop) + (2 x prob. of 2 hops) + (3 x prob. of 3 hops)

                                                       = (1 × k) + (2 × k × (1 - k)) + (3 × (1-k)²)

                                                       = k + 2k - 2k² + 3(1 + k² - 2k)

∴mean number of hops                = k² - 3k + 3

b.) from (a) above, the mean number of hops when transmitting a packet is k² - 3k + 3

if k = 0 then number of hops is 3

if k = 1 then number of hops is (1 - 3 + 3) = 1

multiple transmissions can be needed if K is between 0 and 1

The probability of successful transmissions through the entire path is (1 - k)²

for one transmission, the probility of success is (1 - k)²

for two transmissions, the probility of success is 2(1 - k)²(1 - (1-k)²)

for three transmissions, the probility of success is 3(1 - k)²(1 - (1-k)²)² and so on

∴ for transmitting a single packet, it makes:

     ∞                             n-1

T = ∑ n(1 - k)²(1 - (1 - k)²)

    n-1

   = 1/(1 - k)²

c.) Mean number of required packet = ( mean number of hops when transmitting a packet × mean number of transmissions by a packet)

from (a) above, mean number of hops when transmitting a packet =  k² - 3k + 3

from (b) above, mean number of transmissions by a packet = 1/(1 - k)²

substituting: mean number of required packet =  k^{2}  - 3k + 3 * \frac{1}{(1 - k)^{2} }\\\\= \frac{k^{2} - 3k + 3 }{(1-k)^{2} }

6 0
3 years ago
In a multiple-column record of a data file, ______ represent different variables and _______ represent different cases
Nookie1986 [14]

Answer:

columns, rows

Explanation:

In Computer programming, a atabase schema refers to the logical design of the database while the database instance refers to a snapshot of the data found in a database at a given instant in time.

Basically, in database management, the term "schema" is used to denote a representation of data while the term "instance" is used to denote an instance of time.

A database schema is a structure which is typically used to represent the logical design of the database and as such represents how data are stored or organized and the relationships existing in a database management system. There are two (2) main categories of a database schema; physical database schema and logical database schema.

Also, a database instance is a snapshot of the data in the database at a given instant in time and as such represents an operational database by following the conditions, validation and constraints set for a database management system.

These data can be stored or organized in a database management system through the use of multiple-column record formats.

In a multiple-column record of a data file, columns represent different variables and rows represent different cases (respondents) such as experimental data, independent observations etc.

4 0
2 years ago
- Create a Java program in both Windows and Ubuntu using any of their Editors *** DO NOT USE IDE'S SUCH AS ECLIPSE, NETBEANS, ET
Marat540 [252]

Answer:

Following are the code to this question:

public class ArrayMath//defining a class ArrayMath

{

public static void main(String[] args) //defining main method

{

int x[][]=new int[10][10]; //defining a 2D array  

arrays(x);//calling a method arrays by passing an array

}

private static void arrays(int[][] x)//defining a method arrays

{

int odd_column_sum=0,sum_of_Elements=0,i,j,even=1;//defining integer variable  

for(i=0;i<x.length;i++)//defining loop for columns  

{

for(j=0;j<x[0].length;j++)//defining loop for rows

{

x[i][j]=i*j;//multiply the i and j value atore in array

}

}

System.out.println("::The 2D array :: ");//print message

for(i=0;i<x.length;i++)//defining loop for columns

{

System.out.print("\t");//use print method for line space and line break  

for(j=0;j<x[0].length;j++)//defining loop for rows

{

System.out.printf("%d\t",x[i][j]); //print array values

}

System.out.println( );//print for line break

}

for(i=0;i<x.length;i++) //defining loop for Columns

{

for(j=0;j<x[0].length;j++) //defining loop for rows

{

if(even%2!=0)//defining if block for check odd number condition

{

odd_column_sum+=x[j][i];//add odd number of array

}

sum_of_Elements+=x[i][j];//add even number of array

}

even++;//increment even variable value by 1

}

System.out.println("The sum of Odd Columns:"+odd_column_sum);//print odd_column_sum value

System.out.println("The array elements :"+sum_of_Elements);//print sum_of_Elements value

}

}

Output:

please find attached file.

Explanation:

In the above-given code, a class "ArrayMath" is defined, inside the class the main method is declared, which define a 2D array "x", this stores 10 columns and 10 rows and at the last, we call the arrays method by passing an array as a variable.

In the arrays method, integer variable, "odd_column_sum, sum_of_Elements, i, j, and even" is defined, in which variable "i and j" is used in the loop for calculating value, even is used to check odd column and then store its value in the "odd_column_sum" variable, and add whole element value is added into the "sum_of_Elements" variable.

8 0
3 years ago
Other questions:
  • When ordering a new​ zagflatz, customers must choose the style of three major​ components, each of which has about ten variation
    6·1 answer
  • A car holds 16 gallons of gasoline and can travel 312 miles before refueling. Write aC++ program that calculates the number of m
    9·1 answer
  • _____ is a systems development technique that produces a graphical representation of a concept or process that systems developer
    11·1 answer
  • I wish we could visit Paris for the holidays into exclamatory​
    12·2 answers
  • When entering a function or formula in a cell, which is the first character
    15·1 answer
  • Difference between automated testing and manual testing
    13·1 answer
  • Which step in the software development life cycle analyzes the scope of work?
    6·1 answer
  • Complete the function favoriteFlower(). Note that the program will not run as is because the function is incomplete. The purpose
    15·1 answer
  • Each JavaScript command line ends with a(n) ____ to separate it from the next command line in the program.
    5·1 answer
  • a network administrator for a large oil company has discovered that a host on the company network has been compromised by an att
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!