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
elena-s [515]
2 years ago
5

Fields & Methods

Computers and Technology
1 answer:
andrezito [222]2 years ago
4 0

Answer:

rdcfvg5

Explanation:

hgc3wrftgyhjukiolp

You might be interested in
Within MethodsPractice.java, write a method public static int planParty2(int f, int c, int p) that performs the same calculation
Vesna [10]

Answer:

// class definition of MethodPractice

public class MethodPractice {

   // main method that begin program execution

   public static void main(String args[]) {

       // call to the planParty2 method is done using some parameter

       // and the return value is displayed

     System.out.println("The number of p-packs needed is: " + planParty2(9, 14, 6));

     System.out.println("The number of p-packs needed is: " + planParty2(4, 6, 3));

     System.out.println("The number of p-packs needed is: " + planParty2(4, 6, 4));

   }

   

   // planParty2 method with 3 parameters and it return an integer

   // the calculation needed to get the required pack is done here

   public static int planParty2(int f, int c, int p){

       // the party owner is added to list of friend

       // and the value is assigned to totalPeople

       int totalPeople = f + 1;

       // the totalPeople times the can drink

       // is assigned to totalDrinkNeeded

       int totalDrinkNeeded = totalPeople * c;

       // number of packs required is declared

       int numberOfPacks;

       // if the totalDrinkNeeded contains exact multiple of a pack

       // we return the numberOfPack by dividing totalDrinkNeeded with p

       if (totalDrinkNeeded % p == 0){

           return numberOfPacks = totalDrinkNeeded / p;

       }

       // else we compute if the totalDrinkNeeded is not a multiple of a pack

       //  first we get the remainder when the totalDrinkNeeded is divided with p

       // then the needed can is computed by subtracting remainder from p

       // the neededCan is added to totalDrinkNeeded, then divided with p

       // and assigned to numberOfPacks

       // numberOfPacks is returned.

       else {

           int remainder = totalDrinkNeeded % p;

           int neededCan = p - remainder;

           numberOfPacks = (totalDrinkNeeded + neededCan) / p;

           return numberOfPacks;

       }

   }

}

Explanation:

Image showing the detailed question is attached.

The program is written in Java and is well commented. A sample image of program output when it is executed is attached.

3 0
3 years ago
Which of the following ensures that dropped packets are resent?
Agata [3.3K]

Answer:

TCP

Explanation:

Transmission control protocol ensures packets loss and performs retransmission

TCP works with Internet Protocol (IP)

TCP/IP defines how computers send data packets to each other.

TCP allows transmission of information in both the direction.

Bit rate :defines the rate at which bits are transferred from one place to another

7 0
3 years ago
Analyze the following code (in both cases number has been declared and initialized): Code 1: boolean even; if (number % 2 == 0)
shusha [124]

Answer:

Both codes are correct.The value of even is true when the number is even.

Explanation:

Code 1:

number %2 ==0 means that when dividing number by 2 is the remainder coming out is zero.If it is true then even becomes is true if it is false then else statement is executes in which even becomes false.Means the number is odd.This code is simple and easy to understand.

Code 2:-

This code is a bit tricky and takes time to understand.even becomes true

when the number is divisible by 0 and false when it is not.

8 0
3 years ago
No links, thank you
Andrei [34K]

Answer:

The most direct effect that the internet has had on retail sales is THE DEVELOPMENT OF E-COMMERCE.

E- Commerce refers to the commercial transactions that are conducted via the internet. The advance in technology has makes it possible for the retailers to advertise their products and get across to the consumers via the internet. Buying and selling on the internet is now more preferable to most people than the traditional buying and selling because of its convenience.

4 0
2 years ago
What is the output of the following program segment?
marissa [1.9K]

Answer:

5

Explanation:

The operator 'x++' is called the post increment operator, it is assign first and then increment.

The operator '++x' is called the pre increment operator, it is increment first  and then increment.

So, both are increment operator which increment the value by one.

initially the value of x is zero,

++x increase the value to 1 and than assign to x.

then, x++ it assign to x first then increment by 1 means x=2

and so on.....

Their are five increment operator are used. so, the result is 5.

3 0
3 years ago
Other questions:
  • What is the difference between computer architecture and computer organization?
    10·2 answers
  • To gain one pound of fat, how many extra calories would you need to consume?
    12·1 answer
  • Meaning of 'WSAD" iiiiii
    10·2 answers
  • When Kristy recently started a photography business, she downloaded Photoshop to her computer to edit her photos. She notices he
    10·1 answer
  • Write an if-else statement for the following: If user_tickets is less than 5, assign 1 to num_tickets. Else, assign user_tickets
    15·1 answer
  • A network systems administrator would most likely help with
    13·2 answers
  • What are the four steps for planning a table?​
    10·1 answer
  • Case Project 2-1: The Differences Between IPv4 and IPv6 You are a network engineer for an IT consulting firm named F1IT. One of
    5·1 answer
  • In how many positions are there nucleotide differences between your query sequence and the sequence of accession AY259214.1
    12·1 answer
  • You are creating a web page as part of a science project. Your role is to put your data on the webpage. You tracked the growth o
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!