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
lilavasa [31]
3 years ago
5

Can someone help me with this lab assignment? I really do not know what should I do?

Computers and Technology
1 answer:
blondinia [14]3 years ago
4 0

Answer:

your question is too long to read

Explanation:

try explaining it in fewer words

You might be interested in
Construct sequence using a specified number of integers within a range. The sequence must be strictly increasing at first and th
natulia [17]

Answer:

Explanation:

The following code is written in Java. It first creates a function that takes in the three parameters to create the sequence, if the sequence is valid it returns the created sequence, otherwise it prints -1 and returns an empty array. The second function called compareSequences takes in to sequences as parameters and compares them, printing out the winner. A test case has been provided in the main method and the output can be seen in the image below.

import java.util.Arrays;

class Brainly {

   public static void main(String[] args) {

       int[] seq1 = createSequence(5, 4, 2);

       int[] seq2 = createSequence(5, 3, 3);

       System.out.println("Winner: " + Arrays.toString(compareSequences(seq1, seq2)));

   }

   public static int[] createSequence(int num, int upperEnd, int lowerEnd) {

       int[] myArray = new int[num];

       int middle = (int) Math.floor(num/2.0);

       myArray[0] = upperEnd;

       myArray[num-1] = lowerEnd;

       int currentValue = upperEnd;

       for (int i = 1; i < num-1; i++) {

           if (i <= middle) {

               myArray[i] = currentValue + 1;

               currentValue += 1;

           } else {

               myArray[i] = currentValue - 1;

               currentValue += 1;

           }

       }

       System.out.println(Arrays.toString(myArray));

       if (myArray[num-2] < lowerEnd) {

           System.out.println("-1");

           int[] empty = {};

           return empty;

       } else {

           return myArray;

       }

   }

   public static int[] compareSequences(int[] seq1, int[] seq2) {

       int lowestLength;

       if (seq1.length > seq2.length) {

           lowestLength = seq2.length;

       } else {

           lowestLength = seq1.length;

       }

       for (int i = 0; i < lowestLength; i++) {

           if (seq1[i] > seq2[i]) {

               return seq1;

           } else if (seq1[i] < seq2[i]) {

               return seq2;

           }

       }

       if (seq1.length > seq2.length) {

           return seq1;

       } else {

           return seq2;

       }

   }

}

7 0
2 years ago
How Java provides protection through stack inspection approach ?
Natalija [7]
Pecting Java<span> 2's </span>stack inspection<span> policy to be enforced can-. not execute on .... Figure 2. PSLang security policy that </span>allows<span> at most 10 open windows. .... </span>Method<span> call/return: A → B. At start of B, look up</span>protection<span> domain PB for B's. code and push PB on the thread-local domain-. </span>Stack<span>. At return from B (either normally or by.</span>
3 0
3 years ago
In python:
egoroff_w [7]

Python can be used to implement central of tendencies such as mean, median and mode using the statistic module

The program in Python, where comments are used to explain each line is as follows:

#This imports the statistics module

import statistics

#This defines the function that calculates the mode

def calcMode(myList):

   #This prints the mode

   print(statistics.multimode(myList))

#This defines the function that calculates the median

def calcMedian(myList):

   #This prints the median

   print(statistics.median(myList))

#The main method begins here

#This initializes the list

myList = []

#The following iteration gets input for the list

for i in range(10):

   myList.append(int(input()))

#This calls the calcMode method

calcMode(myList)

#This calls the calcMedian method

calcMedian(myList)

Read more about similar programs at:

brainly.com/question/25026386

8 0
2 years ago
Wedding photographers must be skilled at producing photographs that capture the
vampirchik [111]

Answer

True, BUT they can be trained.

Explanation:

4 0
3 years ago
The set of rules for how computers talk to one another is called
lianna [129]
Protocol. Like TCP/IP or HTTP etc
6 0
3 years ago
Other questions:
  • How do humans feel about being abducted?
    12·2 answers
  • Ben assembled parts of a computer and created a fully functional desktop PC. He wants the computer to connect to the Internet. W
    10·1 answer
  • Press the ____ key(s) to erase one character to the left of the insertion point.
    10·2 answers
  • If i throw papers in the dryer to help them dry faster could that mess up the dryer?
    5·1 answer
  • Basic rule for java languague
    13·2 answers
  • What is the internet ?
    11·2 answers
  • What should you remember when using the thesaurus to replace words?
    8·2 answers
  • A musical time measurer is a(an)
    10·1 answer
  • I get such an error when I turn on the computer, how can I fix it?
    7·1 answer
  • Does "remainder of x from y" mean xmody?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!