3. In your application, you are using a stack data structure to manipulate information. You need to find which data item will be processed next, but you don’t want to actually process that data item yet. Which of the following queue operations will you use?
a) pop
b) push
c) peek
d) contains

Answers

Answer 1

Answer:

I think its contains, but i would ask on stack overflow.

Explanation:


Related Questions

Which term refers to a solution to a large problem that is based on the solutions of smaller subproblems. A. procedural abstraction B. API C. modularity D. library

Answers

Answer:

procedural abstraction

Explanation:

The term that refers to a solution to a large problem that is based on the solutions of smaller subproblems is A. procedural abstraction.

Procedural abstraction simply means writing code sections that are generalized by having variable parameters.

Procedural abstraction is essential as it allows us to think about a framework and postpone details for later. It's a solution to a large problem that is based on the solutions of smaller subproblems.

Read related link on:

https://brainly.com/question/12908738

write a function insert_string_multiple_times() that has four arguments: a string, an index into the string, a string to insert, and a count. the function will return a string with count copies of the insert-string inserted starting at the index. note: you should only write the function. do not put any statements outside of the function. examples: insert_string_multiple_times('123456789',3,'xy',3) '123xyxyxy456789' insert_string_multiple_times('helloworld',5,'.',4) 'hello....world' insert_string_multiple_times('abc',0,'a',2) 'aaabc' insert_string_multiple_times('abc',0,'a',0) 'abc'

Answers

Answer:

Written in Python:

def insert_string_multiple_times(str1,indto,str2,count):

   splitstr = str1[:indto]

   for i in range(count):

       splitstr+=str2

       

   splitstr +=str1[indto:]

   print(splitstr)

Explanation:

This line defines the method

def insert_string_multiple_times(str1,indto,str2,count):

In the above definition:

str1 represents the string

indto represents index to insert a new string

str2 represents the new string to insert

count represents the number of times str2 is to be inserted

This gets the substring from the beginning to indto - 1

   splitstr = str1[:indto]

This performs an iterative operation

   for i in range(count):

This appends str2 to the first part of the separated string

       splitstr+=str2

This appends the remaining part of the separated string        

   splitstr +=str1[indto:]

This prints the new string

   print(splitstr)

Define the _make method, which takes one iterable argument (and no self argument: the purpose of _make is to make a new object; see how it is called below); it returns a new object whose fields (in the order they were specified) are bound to the values in the interable (in that same order). For example, if we called Point._make((0,1)) the result returned is a new Point object whose x attribute is bound to 0 and whose y attribute is bound to 1.

Answers

This picture will show you the answer and guide the way to victory

We can actually see that the _make method is known to be a function that creates named tuple type.

What is _make method?

_make method is seen in Python programming which is used to create a named tuple type instantly. It can be used for conversion of objects e.gtuple, list, etc. to named tuple.

Thus, we see the definition of _make method.

Learn more about Python on https://brainly.com/question/26497128

#SPJ2

Play now? Play later?
You can become a millionaire! That's what the junk mail said. But then there was the fine print:

If you send in your entry before midnight tonight, then here are your chances:
0.1% that you win $1,000,000
75% that you win nothing
Otherwise, you must PAY $1,000

But wait, there's more! If you don't win the million AND you don't have to pay on your first attempt,
then you can choose to play one more time. If you choose to play again, then here are your chances:
2% that you win $100,000
20% that you win $500
Otherwise, you must PAY $2,000

What is your expected outcome for attempting this venture? Solve this problem using
a decision tree and clearly show all calculations and the expected monetary value at each node.
Use maximization of expected value as your decision criterion.

Answer these questions:
1) Should you play at all? (5%) If you play, what is your expected (net) monetary value? (15%)
2) If you play and don't win at all on the first try (but don't lose money), should you try again? (5%) Why? (10%)
3) Clearly show the decision tree (40%) and expected net monetary value at each node (25%)

Answers

Answer:

wow what a scam

Explanation:

were is the hype house

Answers

Answer:

LA

Explanation:

where the rich people live

Answer:

los angeles

Explanation:

they're also very much in the shade right now

What styles can the calendar be printed in? Check all that apply.

Quick
Daily style
Weekly Agenda style
Weekly Calendar style
Monthly Agenda style
Monthly style
Bifold style
Trifold style

Answers

Please Help! Unit 6: Lesson 1 - Coding Activity 2
Instructions: Hemachandra numbers (more commonly known as Fibonacci numbers) are found by starting with two numbers then finding the next number by adding the previous two numbers together. The most common starting numbers are 0 and 1 giving the numbers 0, 1, 1, 2, 3, 5...
The main method from this class contains code which is intended to fill an array of length 10 with these Hemachandra numbers, then print the value of the number in the array at the index entered by the user. For example if the user inputs 3 then the program should output 2, while if the user inputs 6 then the program should output 8. Debug this code so it works as intended.

The Code Given:

import java.util.Scanner;

public class U6_L1_Activity_Two{
public static void main(String[] args){
int[h] = new int[10];
0 = h[0];
1 = h[1];
h[2] = h[0] + h[1];
h[3] = h[1] + h[2];
h[4] = h[2] + h[3];
h[5] = h[3] + h[4];
h[6] = h[4] + h[5];
h[7] = h[5] + h[6];
h[8] = h[6] + h[7]
h[9] = h[7] + h[8];
h[10] = h[8] + h[9];
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
if (i >= 0 && i < 10)
System.out.println(h(i));
}
}

Answer:

Daily style

Weekly Agenda style

Weekly Calendar style

Monthly style

Trifold style

or

B, C, D, F, H

Do not use the scanner class or any other user input request. You application should be self-contained and run without user input.

Assignment Objectives

Practice on implementing inheritance in Java

FootballPlayer will extend a new class, Person

Overriding methods

toString( ) (Links to an external site.)Links to an external site. which is a method from the Object class, will be implemented in OffensiveLine, FootballPlayer, Person and Height

Keep working with more complex classes

in the same way that FootballPlayer had a class as an attribute (Height height), OffensiveLine will have FootballPlayer as an attribute

Deliverables

A zipped Java project according to the How to submit Labs and Assignments guide.

O.O. Requirements (these items will be part of your grade)

One class, one file. Don't create multiple classes in the same .java file

Don't use static variables and methods

Encapsulation: make sure you protect your class variables and provide access to them through get and set methods

all the classes are required to have a constructor that receives all the attributes as parameters and update the attributes accordingly

Follow Horstmann's Java Language Coding GuidelinesLinks to an external site.

Organized in packages (MVC - Model - View Controller)

Contents

Person int number app Creates a Model object * String name Height * String position Height height int feet int inches int weight Model . String hometown . String highSchool .String toString( ) Creates three FootballPlayer objects Creates an OffensiveLine object using the three FootballPlayer objects Displays OffensiveLine information Displays OffensiveLine average weight . String toString() extends FootballPlayer * String position . String toString() int number OffensiveLine .FootballPlayer center .FootballPlayer offensiveGuard .FootballPlayer offensiveTackle . String toString()

Create a Netbeans project (or keep developing from your previous lab) with

App.java

Model

Model.java

FootballPlayer.java

Height.java

Person.java

OffensiveLine.java

Functionality

The application App creates a Model object

The Model class

creates 3 FootballPlayer objects

creates an OffensiveLine object using the 3 FootballPlayer objects

displays information about the OffensiveLine object and its 3 players

it is a requirement that this should be done using the toString( ) method in OffensiveLine, which will use toString( ) in FootballPlayer

displays the average weight of the OffensiveLine

this will be done using the averageWeight in the OffensiveLine

The classes

App

it has the main method which is the method that Java looks for and runs to start any application

it creates an object (an instance) of the Model class

Model

this is the class where all the action is going to happen

it creates three football players

it creates an OffensiveLine object using the three players

displays information about the OffensiveLine

this has to be done using the OffensiveLine object

this is really information about its 3 players

the format is free as long as it contains all the information about each of the 3 players

displays the average weight of the OffensiveLine

this has to be done using the OffensiveLine object

this has to call the averageWeight method in OffensiveLine

Personhas the following attributes

String name;

Height height;

int weight;

String hometown;

String highSchool;

and a method

String toString( )

toString( ) overrides the superclass Object toString( ) method

toString( ) returns information about this class attributes as a String

encapsulation

if you want other classes in the same package yo have access to the attributes, you need to make them protected instead of private.

see more here.

FootballPlayerhas the following attributes

int number;

String position;

and a method

String toString( )

toString( ) overrides the superclass Object toString( ) method

toString( ) returns information about this class attributes as a String

Height

it is a class (or type) which is used in Person defining the type of the attribute height

it has two attributes

int feet;

int inches

and a method

String toString( )

toString( ) overrides the superclass Object toString( ) method

toString( ) returns information about this class attributes as a String

it returns a formatted string with feet and inches

for instance: 5'2"

OffensiveLinehas the following attributes

FootballPlayer center;

FootballPlayer offensiveGuard;

FootballPlayer offensiveTackle;

They might also be stored in an ArrayList

and two methodsString toString( )

toString( ) overrides the superclass Object toString( ) method

toString( ) returns information about the 3 players attributes as a String

int averageWeight()

calculates and returns the average weigh of the OffensiveLine.

it is calculated based on the weight of each of its players

Answers

يتريرينييننيخيوويميمسكيك

Giving brainliest if you answer question.

Answers

The length of the inclined plane divided by the vertical rise, or you can call it run to rise ratio. The mechanical advantage would increase as the slope of the incline decreases, but problem is that the load will have to go a longer distance. The mechanical advantage would be slope of the incline. I also got confused on a question like this and did some research. Hope this helps!

Declare an array of 10 integers. Initialize the array with the following values: 000 101 202 303 404 505 606 707 808 909 Write a loop to search the array for a given number and tell the user if it was found. Do NOT write the entire program. Example: User input is 404 output is "found". User input is 246 output is "not found"

Answers

Answer:

In C++:

#include <iostream>

using namespace std;

int main(){

   int myArray[10] = {000, 101, 202, 303, 404, 505, 606, 707, 808, 909};

   int num;

   bool found = false;

   cout<<"Search for: ";

   cin>>num;

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

       if(myArray[i]==num){

           found = true;

           break;

       }

   }

   if(found){ cout<<"found"; }

   else { cout<<"not found"; }

   return 0;

}

Explanation:

This line initializes the array

int myArray[10] = {000, 101, 202, 303, 404, 505, 606, 707, 808, 909};

This line declares num as integer

   int num;

This initializes boolean variable found to false

   bool found = false;

This prompts user for input

   cout<<"Search for: ";

This gets user input

   cin>>num;

This iterates through the array

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

This checks if num is present in the array

       if(myArray[i]==num){

If yes, found is updated to true

           found = true;

And the loop is exited

           break;

       }

   }

If found is true, print "found"

   if(found){ cout<<"found"; }

If found is false, print "not found"

   else { cout<<"not found"; }

Write a program with the total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies. The input should be an integer, with the unit as "cents". For example, the input of 126 refers to 126 cents. 1 Dollar = 100 cents 1 Quarter = 25 cents 1 Dime = 10 cents 1 Nickel = 5 cents 1 Penny = 1 cent Ex: If the input is:

Answers

Answer:

In Python:

cents = int(input("Cents: "))

dollars = int(cents/100)

quarters = int((cents - 100*dollars)/25)

dimes = int((cents - 100*dollars- 25*quarters)/10)

nickels = int((cents - 100*dollars- 25*quarters-10*dimes)/5)

pennies = cents - 100*dollars- 25*quarters-10*dimes-5*nickels

if not(dollars == 0):

   if dollars > 1:

       print(str(dollars)+" dollars")

   else:

       print(str(dollars)+" dollar")

if not(quarters == 0):

   if quarters > 1:

       print(str(quarters)+" quarters")

   else:

       print(str(quarters)+" quarter")

if not(dimes == 0):

   if dimes > 1:

       print(str(dimes)+" dimes")

   else:

       print(str(dimes)+" dime")

if not(nickels == 0):

   if nickels > 1:

       print(str(nickels)+" nickels")

   else:

       print(str(nickels)+" nickel")

if not(pennies == 0):

   if pennies > 1:

       print(str(pennies)+" pennies")

   else:

       print(str(pennies)+" penny")

   

Explanation:

A prompt to input amount in cents

cents = int(input("Cents: "))

Convert cents to dollars

dollars = int(cents/100)

Convert the remaining cents to quarters

quarters = int((cents - 100*dollars)/25)

Convert the remaining cents to dimes

dimes = int((cents - 100*dollars- 25*quarters)/10)

Convert the remaining cents to nickels

nickels = int((cents - 100*dollars- 25*quarters-10*dimes)/5)

Convert the remaining cents to pennies

pennies = cents - 100*dollars- 25*quarters-10*dimes-5*nickels

This checks if dollars is not 0

if not(dollars == 0):

If greater than 1, it prints dollars (plural)

   if dollars > 1:

       print(str(dollars)+" dollars")

Otherwise, prints dollar (singular)

   else:

       print(str(dollars)+" dollar")

This checks if quarters is not 0

if not(quarters == 0):

If greater than 1, it prints quarters (plural)

   if quarters > 1:

       print(str(quarters)+" quarters")

Otherwise, prints quarter (singular)

   else:

       print(str(quarters)+" quarter")

This checks if dimes is not 0

if not(dimes == 0):

If greater than 1, it prints dimes (plural)

   if dimes > 1:

       print(str(dimes)+" dimes")

Otherwise, prints dime (singular)

   else:

       print(str(dimes)+" dime")

This checks if nickels is not 0

if not(nickels == 0):

If greater than 1, it prints nickels (plural)

   if nickels > 1:

       print(str(nickels)+" nickels")

Otherwise, prints nickel (singular)

   else:

       print(str(nickels)+" nickel")

This checks if pennies is not 0

if not(pennies == 0):

If greater than 1, it prints pennies (plural)

   if pennies > 1:

       print(str(pennies)+" pennies")

Otherwise, prints penny (singular)

   else:

       print(str(pennies)+" penny")

   

List the three ways Python can handle colors.

Answers

Answer:

Try using coloramapackage in python for text colour & has cross platform support across Windows & Linux. It can also be used in conjunction with existing ANSI libraries like Termcolor. This approach would be better than manually printing ASCII sequences for text colouring on terminals. from colorama import Fore, Back, Style

Explanation:

This function finds the minimum number in a list. What should be replaced with in order for this function to operate as expected?

Answer choices:

A. numList[i] = min;
B. min = numList[i];
C. min = numList;
D. numList = min;

Answers

Answer: a

Explanation:

Just took the test

Segmentation Faults Recall what causes segmentation fault and bus errors from lecture. Common cause is an invalid pointer or address that is being dereferenced by the C program. Use the program average.c from the assignment page for this exercise. The program is intended to find the average of all the numbers inputted by the user. Currently, it has a bus error if the input exceeds one number. Load average.c into gdb with all the appropriate information and run it. Gdb will trap on the segmentation fault and give you back the prompt. First find where the program execution ended by using backtrace (bt as shortcut) which will print out a stack trace. Find the exact line that caused the segmentation fault.
Q13. What line caused the segmentation fault?
Q14. How do you fix the line so it works properly?
You can recompile the code and run the program again. The program now reads all the input values but the average calculated is still incorrect. Use gdb to fix the program by looking at the output of read_values. To do this, either set a breakpoint using the line number or set a breakpoint in the read_values function. Then continue executing to the end of the function and view the values being returned. (To run until the end of the current function, use the finish command).
Q15. What is the bug? How do you fix it?
//average.c
#include
/*
Read a set of values from the user.
Store the sum in the sum variable and return the number of values
read.
*/
int read_values(double sum) {
int values=0,input=0;
sum = 0;
printf("Enter input values (enter 0 to finish):\n");
scanf("%d",&input);
while(input != 0) {
values++;
sum += input;
scanf("%d",input);
}
return values;
}
int main() {
double sum=0;
int values;
values = read_values(sum);
printf("Average: %g\n",sum/values);
return 0;
}

Answers

Answer:

See Explanation

Explanation:

Q13. Line that caused the segmentation fault?

The segmentation fault was caused by line 15 i.e. scanf("%d",input);

Q14. How the line was fixed?

The reason for the segmentation fault is that the instruction to get input from the user into the integer variable "input" was not done correctly.

The correction to this is to modify scanf("d",input) to scanf("%d",input);

Q15. The bug?

The bug is that the method needs to return two value; the sum of the inputted numbers and the count of the inputted numbers.

However. it only returns the count of the inputted number.

So, the average is calculated as: 0/count, which will always be 0

How it was fixed?

First, change the method definition to: void and also include an array as one of its parameters.

void read_values(double sum, double arr []) {

Next:

assign sum to arr[0] and values to arr[1]

In the main method:

Declare an array variable: double arr [2];

Call the read_values function using: read_values(sum,arr);

Get the sum and values using:

sum = arr[0];

values = arr[1];

Lastly, calculate and print average:

printf("Average: %g\n",sum/values);

See attachment for complete modified program

what is musical technology specifically, the origins of its genesis & its importance to the baroque era

Answers

Answer:

There were three important features to Baroque music: a focus on upper and lower tones; a focus on layered melodies; an increase in orchestra size. Johann Sebastian Bach was better known in his day as an organist. George Frideric Handel wrote Messiah as a counterargument against the Catholic Church

Does modern technology make our lives better,worse ,or doesn’t really make a change in your life ?Whats your opinion ?

Answers

It makes life better. Easy to communicate, everything you need is at your disposal, from whether forecasts to a calculator on your phone

String[][] arr = {{"Hello,", "Hi,", "Hey,"}, {"it's", "it is", "it really is"}, {"nice", "great", "a pleasure"},

{"to", "to get to", "to finally"}, {"meet", "see", "catch up with"},
{"you", "you again", "you all"}};
for (int j = 0; j < arr.length; j++) {
for (int k = 0; k < arr[0].length; k++) {
if (k == 1) { System.out.print(arr[j][k] + " ");
}
}
}
What, if anything, is printed when the code segment is executed?

Answers

Answer:

Explanation:

The code that will be printed would be the following...

Hi, it is great to get to see you again

This is mainly due to the argument (k==1), this argument is basically stating that it will run the code to print out the value of second element in each array within the arr array. Therefore, it printed out the second element within each sub array to get the above sentence.

When the code segment is executed, the output is "Hi, it is great to get to see you again "

In the code segment, we have the following loop statements

for (int j = 0; j < arr.length; j++) {for (int k = 0; k < arr[0].length; k++) {

The first loop iterates through all elements in the array

The second loop also iterates through all the elements of the array.

However, the if statement ensures that only the elements in index 1 are printed, followed by a space

The elements at index 1 are:

"Hi," "it" "is" "great" "to" "get" "to" "see" "you" "again"

Hence, the output of the code segments is "Hi, it is great to get to see you again "

Read more about loops and conditional statements at:

https://brainly.com/question/26098908

You plan on using cost based pricing. The cost of your product is 10, and you are planning a 30% mark up. What should the price of your product be?

Answers

Answer:

Selling price= $13

Explanation:

Giving the following information:

The cost of your product is $10, and you are planning a 30% mark-up.

The price of the product is calculated by adding to the manufacturing costs a predetermined percentage.

Selling price= 10*1.3

Selling price= $13

Hope this helps :)

what 80s Disney movie was called the movie that nearly killed Disney? P.S. look it up

Answers

Answer:

The black cauldron

Explanation:

it was the most expensive animated film of its time ever made

Answer: The Black Couldren.

Explanation:

g Write a program that reads a list of words, and a character. The output of the program is every word in the list of words that contains the character at least once. For coding simplicity, follow each output word by a comma, even the last one. Assume at least one word in the list will contain the given character. The number of input words is always less than and equal to 10. If the user enters more than 10 words before the character, the program will output Too many words and exit.

Answers

Answer:

Here you go, alter this as you see fit :)

Explanation:

array = []

cnt = 0

while cnt < 11:

   x = input("Enter a word: ")

   array.append(x)

   cnt += 1

   y = input("Add another word?(Y/n):  ")

   if y.lower() == "n":

       break

letter = input("\nChoose a letter: ")

if len(letter) != 1:

   print("Error: too many characters")

   quit()

for n in range(len(array)):

   if letter.lower() in array[n].lower():

       print(array[n], end= ",")

Write the Number class that can be used to test if the number is odd, even, and perfect. A perfect number is any number that is equal to the sum of its divisors. Write the NumberAnalyzer class that has an ArrayList of Number to determine how many numbers in the list are odd, even, and perfect.

Answers

Answer:

Explanation:

The following code is written in Python. It creates a class that takes in one ArrayList parameter and loops through it and calls two functions that check if the numbers are Perfect, Odd, or Even. Then it goes counting each and printing the final results to the screen.

class NumberAnalyzer:

   def __init__(self, myArray):

       perfect = 0

       odd = 0

       even = 0

       for element in myArray:

           if self.isPerfect(element) == True:

               perfect += 1

           else:

               if self.isEven(element) == True:

                   even += 1

               else:

                   odd += 1

       print("# of Perfect elements: " + str(perfect))

       print("# of Even elements: " + str(even))

       print("# of Odd elements: " + str(odd))

   def isPerfect(self, number):

       sum = 1

       i = 2

       while i * i <= number:

           if number % i == 0:

               sum = sum + i + number / i

           i += 1

       if number == sum:

           return True

       else:

           return False

   def isEven(self, number):

       if (number % 2) == 0:

           return True

       else:

           return False

Create a program that allows the user to pick and enter a low and a high number. Your program should generate 10 random numbers between the low and high numbers picked by the user. Store these 10 random numbers in a 10 element array and output to the screen.
In java code please.

Answers

Answer:

import java.util.Scanner;

import java.util.Arrays;

import java.util.Random;

public class Main {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   System.out.print("Enter low: ");

   int low = scan.nextInt();

   System.out.print("Enter high: ");

   int high  = scan.nextInt();

   scan.close();

   int rndnumbers[] = new int[10];

   Random r = new Random();

   for(int i=0; i<rndnumbers.length; i++) {

     rndnumbers[i] = r.nextInt(high-low+1) + low;

   }

   for(int i=0; i<rndnumbers.length; i++) {

     System.out.printf("%d: %d\n", i, rndnumbers[i]);

   }

 }

}

1. What does it mean for a website to be "responsive"?

Answers

this just means that the website will be able to render on many different sized screens

What does the term "death by powerpoint" refer to when dealing with Powerpoint presentations?

Answers

Answer:

Death by PowerPoint is a phenomenon caused by the poor use of presentation software. Key contributors to death by PowerPoint include confusing graphics, slides with too much text and presenters whose idea of a good presentation is to read 40 slides out loud.

Explanation:

Hope this helps :)

Veronica is looking for a reliable website with information about how old you have to be to use social media. What should she look for?

Answers

Answer:

The URL of the website

Explanation:

Look for .gov and .edu as they are often reliable sources

. What projects would Excel best be used for?

Answers

Answer:

Projects that require spreadsheet organization and/or calculations between data

Explanation:

That is why Excel is a spreadsheet program

I need help on these three questions I would really appreciate it

Answers

Answer:

True

c

void

Explanation:

I dont know how i know this...

x = 2. x+=15

Int returns number Boolean returns true of false . . . void return none.

do you know that the 80s was not one of Disney's best decades? what was a reason?

Answers

Answer:

They produced a movie called the black couldren that nearly killed them.

The return value is a one-dimensional array that contains two elements. These two elements indicate the rows and column indices of the largest element in the two-dimensional array. Write a test program that prompts the user to enter a two-dimensional array and displays the location of the largest element in the array.

Answers

Answer:

In Java:

import java.util.Scanner;  

import java.util.Arrays;  

public class Main  {  

public static void main(String args[])  {  

Scanner input = new Scanner(System.in);

int row, col;  

System.out.print("Rows: ");    row = input.nextInt();

System.out.print("Cols: ");     col = input.nextInt();  

int[][] Array2D = new int[row][col];

System.out.print("Enter array elements: ");

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

    for(int j =0;j<col;j++){

        Array2D[i][j] = input.nextInt();  

    }     }

 

int[] maxarray = findmax(Array2D,row,col);

System.out.println("Row: "+(maxarray[0]+1));

System.out.println("Column: "+(maxarray[1]+1));

}  

public static int[] findmax(int[][] Array2D,int row, int col)   {  

int max = Array2D[0][0];

int []maxitem = new int [2];

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

    for(int j =0;j<col;j++){

        if(Array2D[i][j] > max){  

            maxitem[0] = i;

            maxitem[1] = j; } }    }

 

return maxitem;  

}  

}

Explanation:

The next two lines import the scanner and array libraries

import java.util.Scanner;  

import java.util.Arrays;  

The class of the program

public class Main  {  

The main method begins here

public static void main(String args[])  {  

The scanner function is called in the program

Scanner input = new Scanner(System.in);

This declares the array row and column

int row, col;

This next instructions prompt the user for rows and get the row input  

System.out.print("Rows: ");    row = input.nextInt();

This next instructions prompt the user for columns and get the column input  

System.out.print("Cols: ");     col = input.nextInt();  

This declares the 2D array

int[][] Array2D = new int[row][col];

This prompts the user for array elements

System.out.print("Enter array elements: ");

The following iteration populates the 2D array

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

    for(int j =0;j<col;j++){

        Array2D[i][j] = input.nextInt();  

    }     }

This calls the findmax function. The returned array of the function is saved in maxarray  

int[] maxarray = findmax(Array2D,row,col);

This prints the row position

System.out.println("Row: "+(maxarray[0]+1));

This prints the column position

System.out.println("Column: "+(maxarray[1]+1));

The main method ends here

}  

The findmax function begins here

public static int[] findmax(int[][] Array2D,int row, int col)   {  

This initializes the maximum to the first element of the array

int max = Array2D[0][0];

This declares maxitem. The array gets the position of the maximum element

int []maxitem = new int [2];

The following iteration gets the position of the maximum element

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

    for(int j =0;j<col;j++){

        if(Array2D[i][j] > max){  

            maxitem[0] = i; -- The row position is saved in index 0

            maxitem[1] = j;  -- The column position is saved in index 1} }    }

This returns the 1 d array

return maxitem;  

}  

is English-like, easy to learn and use. uses short descriptive word to represent each of the machine-language instructions. is computer's native language. translates the entire source code into a machine-code file. processes one statement at a time, translates it to the machine code, and executes it. is a program written in a high-level programming language. is a program that translates assembly-language code into machine code.

Answers

Answer:

The appropriate choice is "Assembly Language ".

Explanation:

Such assembly languages were indeed low-level software packages designed for something like a mobile device or indeed any programmable machine. Written primarily throughout assembly languages shall be constructed by the assembler. Each assembler seems to have its programming languages, which would be focused on a particular computational physics.

What is the output of the following code snippet if the variable named cost contains 100? if cost < 70 or cost > 150 : discount = 0.8 * cost else : discount = cost print("Your cost is ", discount)

Answers

Answer:

The output is: Your cost is  100

Explanation:

Given

The above code snippet

and

[tex]cost = 100[/tex]

Required

Determine the output of the code

if cost < 70 or cost > 150

The above condition checks if cost is less than 70 or cost is greater than 150

This condition is false because 100 is neither less than 70 nor is it greater than 150

So, the else statement will be executed.

discount = cost

Which means

discount = 100

So, the print instruction will print: Your cost is  100

Other Questions
I urgently need help!!!! (PLS HELP DUE IN 5 MINS!) The pteropoda, or sea butterfly, is a tiny sea creature about the size of a small pea. Pteropoda are eaten by organisms ranging in size from tiny krill to whales. They are a major food source for the North Pacific juvenile. Their shells are made up of calcium carbonate. The photo provided is the shell of a pteropoda. The shell can dissolve within a 45 day period. What can one infer about what is causing the shell of the pteropoda to disappear while in a marine environment?a) Carbon monoxide (CO) is being released by natural systems. Oceans are absorbing this excess of CO and the pH within the oceans is increasing.b) Methane (CH4 is being released too quickly from burning of fossil fuels. Oceans are lowering their pH and ocean acidification occurs.c) Natural sources are releasing an excess of CO2 to the oceans. The marine photosynthetic organisms are emitting too much oxygen. This is return is causing ocean acidification.d) The excess of CO2 emitted from anthropogenic sources is being absorbed by the oceans from the atmosphere. This results in more hydrogen ions in the ocean, which increases acidification. 50 states, please fill in the box Which action caused many American colonists to support independence from the British EmpireA. Great Britain abolished its constitution and became a monarchy B. Great Britain forced the colonists to follow the rule of law C. Great Britain increased taxes on many items in the colonies.D. Great Britain separated the colonists government into three branches THIS IS HOMEWORK TROLLS WILL BE REPORTED AND BEST ANSWER WILL GETBRAINLIEST. WRONG ANSWERS WILL ALSO BE REPORTEDif you can be any Disney character hero, which character would you be and why?5 to 6 sentences please or ur answer will be deleted :) Vivian went on a bicycle trip through Germany with her family. One afternoon, she rode her bicycle along a long flat road at a constant speed for 24 kilometers (km). The ride took her 1.2 hours (h). At what speed did she ride her bicycle? Freddy is an aspiring web game programmer. Which degree can lead him to game programming?A. degree in software engineeringB. bachelors degree in artsC. associate degree in scienceD. bachelors degree in fine artsE. bachelors degree in graphic design DC current is less than AC currenttrue\false Write the Number class that can be used to test if the number is odd, even, and perfect. A perfect number is any number that is equal to the sum of its divisors. Write the NumberAnalyzer class that has an ArrayList of Number to determine how many numbers in the list are odd, even, and perfect. How does glucose enter a cell?a. through a peripheral proteinb. through integral proteinsc. through cholesterold. between the phospholipids How does this evidence help explain why the skin cancer rate is higher in Australia than in Brazil, even though the two countries get the same amount of sunlight? Which expression is equivalent to 6(3c-4)-2(5c-1) Pls help me this is 7th grade (ADVANCED) Nothing But The Truth textMiss Narwin compares being denied the money for the grant and the music teacher being able to take a summer course for band to ________ and _________ . me need need help on this math Define/explain the Pythagorean theorem. Max sells lemonade for $3 per cup and candy for $2 per bar. He earns $450 selling lemonade and candy. If Max sold 90 bars of candy, how many cups of lemonade did he sell? 6 is what percent of 9? PLEASE HELP!! PICTURES ARE ADDED! PLEASE ONLY ANSWER IF FOR SURE!! 1. What are some similarities among the organisms listed on the cards? What are some differences?2. What is the taxonomy of each organism from largest to smallest grouping?3. What phyla do you have in your chart?4. What classes do you have in your chart?5. What orders do you have in your chart?6. What families do you have in your chart?7. Give four examples of how either some or all of the organisms in this activity are related to one another based on how they are classified.I would like to state i need help organizing the cards so i can take a picture and send it. (as seen in question 2!) If i can give brainliest i will!! Please this will help alot!! The work of which scientist was most essential to the use of radioactiveisotopes in medicine?A. Antoine-Laurent LavoisierB. Robert BoyleC. Marie CurieD. John Dalton