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
kicyunya [14]
3 years ago
10

35 POINTS

Computers and Technology
1 answer:
Ierofanga [76]3 years ago
7 0

Answer:

Complete the program as follows:

1. Replace

String combo =

with

String combo = customerOrder.substring(0);

2. Replace

Integer comboNumber =

with

Integer comboNumber = Integer.parseInt(combo);

Explanation:

Required

Fill in the missing codes

From the code given, there are only two gaps to be filled and they are:

1. String combo =

2. Integer comboNumber =

1. String combo =

The first is to get the first index of customerOrder using substring.

The syntax of this is:

variable.substring(0);

In this case, the syntax will be replaced with:

<em>String combo = customerOrder.substring(0);</em>

Where customerOrder represents the string variables

2. Integer comboNumber =

This is to convert combo from string to integer using parseInt

This is done as follows:

Integer comboNumber = Integer.parseInt(combo);

<em>See attachment for complete code</em>

Download txt
You might be interested in
The ArrayList class contains a trim method that resizes the internal array to exactly the capacity. The trim method is intended
andreev551 [17]

Answer:

public void trimToSize() {

modCount++;

if (size < elementData.length) {

elementData = (size == 0)

? EMPTY_ELEMENTDATA

: Arrays.copyOf(elementData, size);

}

}

Now, the running time for copyOf() function is O(N) where N is the size/capacity of the ArrayList. Hence, the time complexity of trimToSize() function is O(N).

Hence, the running time of building an N-item ArrayList is O(N^2).

Please find the sample code below.

CODE

==================

import java.util.ArrayList;

public class Driver {

  public static void main(String[] args) throws Exception{

      int N = 100000;

      ArrayList<Integer> arr = new ArrayList<>(N);

     

      long startTime = System.currentTimeMillis();

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

          arr.add(i);

          arr.trimToSize();

      }

      long endTime = System.currentTimeMillis();

      double time = (endTime - startTime)/1000;

      System.out.println("Total time taken = " + time + " seconds.");

  }

}

Explanation:

5 0
3 years ago
One way to save time and get to the colleges that you are most interested in at a college fair is to
son4ous [18]

Answer:

Identify the location of the college stand in advance.

Explanation:

One way to save time and get to the colleges that you are most interested in at a college fair is to find out in advance the information about the fair, the colleges that are participating and from that pick the more interesting ones and identify the location of their stands. Like that when you arrive to the fair you can go directly to them and find them easily which will save you a lot of time as you won't be walking around the whole place to find them.

8 0
2 years ago
Read 2 more answers
List four useful spreadsheet functions and explain what they do.
Helen [10]

Answer:

SUM, AVERAGE, MAX,MIN

Explanation:

Sum: The SUM function is categorized under Excel Math and Trigonometry functions. ... The function will sum up cells that are supplied as multiple arguments. It is the most popular and widely used function in Excel. SUM helps users perform a quick summation of specified cells in MS Excel.

Average: The AVERAGE function in Excel does exactly what you think it should. It computes the mathematical average of a set of numbers. In other words, it adds up a set of numbers and then divides the sum by how many numbers are being averaged.

Max: he MAX function will count numbers but ignore empty cells, text, the logical values TRUE and FALSE, and text values. In financial analysis, MAX can be useful in calculating the highest score, the fastest time, the highest expense or revenue amount, etc.

Min: will return the minimum value in a given list of arguments. From a given set of numeric values, it will return the smallest value. Unlike the MINA function, the MIN function ignores numbers, text, and logical values TRUE and FALSE and text values. In financial modeling.

8 0
3 years ago
Explain the role of ICT in banks​
vladimir1956 [14]

Answer: ICT help banks improve the efficiency and effectiveness of services offered to customers, and enhances business processes, managerial decision making, and workgroup collaborations, which strengthens their competitive positions in rapidly changing and emerging economies.

Explanation: please give branliest I only need one more to make ace

7 0
2 years ago
Write a program that prompts the user to input an integer and then outputs both the individual digits of the number and the sum
otez555 [7]

Answer:

Explanation:

#Using python to create the list

#first we create an empty list to store our numbers.

import math

data = []

x = 0

InputSum = 0

NumInput=int(input("how many number do you want to add"))

while x <=(NumInput):

   Input=int(input("Enter the numbers here"))

   data.append(Input)

   x = x+1

   InputSum = InputSum + Input  #this is to add the numbers entered

print("The number you entered are ")

print(*data)  #this print the numbers entered

print("The sum of the numbers is", InputSum)

3 0
3 years ago
Other questions:
  • Write an efficient C++ function that takes any integer value i and returns 2^i ,as a long value. Your function should not multip
    13·1 answer
  • "In an artificial neural network, what input values will cause the neuron below to produce an output of 1". Group of answer choi
    12·1 answer
  • Put these steps for managing your study time in chronological order. 1 set aside the same time each day 2 Identify the best time
    14·1 answer
  • Write a program that allows the user to play a guessing game. The game will choose a "secret number", a positive integer less th
    14·1 answer
  • A(n) ____________________ is hardware or software that blocks or allows transmission of information packets based on criteria su
    13·1 answer
  • Which of the displays could be represented by a single bit?
    12·2 answers
  • . It has been said that technology will be the end of management. Maybe. How about artificial intelligence
    9·1 answer
  • Hardware is found outside the system unit.​
    13·1 answer
  • The purpose of Appetizers on the menu​
    6·2 answers
  • How does links helped a student like you in navigating the different available websites?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!