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
Elodia [21]
3 years ago
12

you where discussing software piracy with a friend and were surprised to learn how software piracy can impact your life every da

y. what is a risk or an effect of software piracy?
Computers and Technology
1 answer:
umka2103 [35]3 years ago
7 0
Ahh, software. What is software piracy?
.
Ok... so it sounds evil.
.
BECAUSE IT IS!!
.
Software piracy can get you and suspected accomplices in court.
.
Fines up to a million dollars and lots of jail time.
.
Lots.
.
And lots.
.
But an effect of software piracy is that the software stealer himself earns money...
.
illegaly.
You might be interested in
Which of the following is TRUE about this statement?
Lynna [10]

E. This statement increments (++) the dereferenced pointer's value (array) by one then "assign" that value.

7 0
3 years ago
What is the most popular airline in the US?
Degger [83]
American Airlines is the most popular.
4 0
3 years ago
Read 2 more answers
Complete the method, longestWord(), below that takes in an array of Strings and returns the longest String in the array. Note: y
beks73 [17]

Answer:

I am writing a JAVA program.

public class StringMethod {

public static String longestWord(String []words) { //method that takes an array  "word" of strings and returns the longest string in the array word

    int pos = 0; // contains index of the longest word of array words

    int longest = words[0].length(); //initially holds the length of the 1st element of words array

    for(int i=1; i< words.length; i++) { // iterates through each word of the array until the end of array

        if(words[i].length() > longest) { // if the length of word at i-th index of words[] is greater than the length of the word that is contained in longest variable

            pos = i; // assigns the index of the longest array element to pos

            longest = words[i].length();    } } //assigns the word in words[] array with the longest length to longest variable

   return words[pos]; } // returns the longest string in the array    

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

String[] animals = {"cat", "horse", "elephant", "bird"}; //creates a String type array named animals which has 4 elements/words

   String longest_word= longestWord(animals); //calls longestWord method to find the longest string in the array animals and assign that longest string to longest_word.

  System.out.println(longest_word); }} //displays the longest word in output

Explanation:

Suppose we have the array of these elements: "cat", "horse", "elephant", "bird" These are four words in the array. Now lets see how the method longestWord() works:

int pos = 0; This variable is initialized to 0.

int longest = words[0].length();

longest holds the length of element at 0th index of words[] array. length() method is used to return the length of the first element words[0] array.

As the first element of array is "cat" so length of cat is 3. Hence longest = 3

for(int i=1; i< words.length; i++)

The loop has a variable i which is initialized to 1. The loop checks if the value of i is less than length of words[] array. The length of words array is 4 as there are 4 elements i.e. cat, horse, elephant and bird in this array. So the condition evaluates to true because i<words.length i.e. 1<4. The body of the loop will execute now. The body of loop contains an if condition if(words[i].length() > longest) which checks if the length of element of array at i-th index is greater than length of the element that is stored in longest variable. As i=1 so word[i] is word[1] which is the second element of words[] array. The second element is horse.

words[i].length()  means the length of i-th element of words[] array. So this means words[1].length() i.e. the length of element of words[] at 1st index. The length of horse is 5. So the statement if(words[i].length() > longest) is true because longest=3 and words[1].length() = 5 and 5>3. So the statements of if condition will execute now.

pos = i; this variable pos is used to hold the index position of the longest element in array. So pos = 1 as longest element computed so far is "horse".

longest = words[i].length(); This statement then assigns the length of horse to longest. So now the value of longest = 5

At second iteration i is now 2.  Loop condition evaluates to true because i<words.length i.e. 2<4. If condition is also true as i=2 so word[i] is word[2] which is elephant.

words[i].length() now means words[2].length() i.e. the length of element of words[] at 2nd index. The length of elephant is 8. So the statement if(words[i].length() > longest) is true because longest=5 and words[2].length() = 8 and 8>5. So the statements of if condition will execute now.

pos = i; now becomes pos = 2 as longest element computed so far is "elephant".

longest = words[i].length();  This statement then assigns the length of horse to longest. So now the value of longest = 8

At third iteration i is now 3.  The loop again checks if the value of i is less than length of words[] array.The condition evaluates to true because i<words.length i.e. 3<4. The body of the loop will execute now.  if(words[i].length() > longest) checks if the length of element of array at i-th index is greater than length of the element that is stored in longest variable. As i=3 so word[i] is word[3] which is the fourth element of words[] array. The fourth element is bird.

words[i].length() now means words[3].length() i.e. the length of element of words[] at 3rd index. The length of bird is 4. So the statement if(words[i].length() > longest) is false because longest=8 and words[2].length() = 4 and 4<8. So the statements of if condition will not execute now.

At fourth iteration i is now 4.  The loop again checks if the value of i is less than length of words[] array.The condition evaluates to false because i==words.length i.e. 4=4. So the loop breaks.

 return words[pos]; statement returns the index position of longest word in words[] array. pos = 2 So the array element at 2nd index is basically the third element of array words[] i.e. elephant. So the longest string in the array is elephant.

8 0
3 years ago
Write structured pseudocode to show the following: If you are at home, get comfortable and take a nap while you are sleepy, othe
marysya [2.9K]

Answer:

Explained

Explanation:

pseudo code

START

If( you are at home)

             THEN

While(Sleepy)

            Take a nap

END while

 ELSE

              Don't take a nap

ENDIf

STOP

4 0
3 years ago
Print person1's kids, call the incNumKids() method, and print again, outputting text as below. End each line with a newline.Samp
professor190 [17]

Answer:

System.out.println("Kids: " + person1.getNumKids());

person1.incNumKids();

System.out.println("New baby, kids now: " + person1.getNumKids());

Explanation:

Reminder: To be able to call a function that is inside a class, we need to use an object of that class. In this case, person1 is our object. If we would like to access any function, we need to type person1.functionName().

1) We need to call getNumKids() to get how many kids they have (It is 3 because user inputs 3 and it is set to the this value using setNumKids() function). To call this function, we need to use person1 object that is created earlier in the <em>main</em> function. To be able to print the result, we call the function inside the <em>System.out.println().</em>

2) To increase the number of kids, we need to call incNumKids() method with person1 object again. This way number of kids are increased by one, meaning they have 4 kids now.

3) To get the current number of kids, we need to call getNumKids() function using person1 object. To be able to print the result, we call the function inside the <em>System.out.println().</em>

8 0
3 years ago
Read 2 more answers
Other questions:
  • When is a wired connection preferred to a wireless connection by an end-user device?
    11·1 answer
  • Write a statement that reads 5 successive integers into these variables that have already been declared : x1 x2x3x4 x5. Then wri
    7·1 answer
  • K. What are the types of page orientation?​
    7·1 answer
  • Write a function named printtriangle that receives a parameter that holds a non-negative integer value and prints a triangle of
    7·1 answer
  • What is the analysis stage in System development life cycle?
    12·1 answer
  • Podcasts are a type of social media that is experienced primarily through
    5·1 answer
  • Visual Basics: 1 ) Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments
    9·1 answer
  • Which is the last step in conducting a URL search?
    14·2 answers
  • What is a router?
    9·1 answer
  • ARP request is send to
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!