Instruction: Create a java program that generates elements (randomly from 10 – 75) of a 2-dimensional array (5x5) using the Random Class then perform the following: 1) Output the array elements 2) Output the sum of prime numbers in the array 3) Output the elements in the main diagonal. 4) Output the sum of the elements below the diagonal. 5) Output the sum of the elements above the diagonal. 6) Output the odd numbers below the diagonal. 7) Output the even numbers above the diagonal.
Q: Question: - Salesforce Please explain how we can grant specific permissions to different profiles fo...
A: Please explain how we grant specific permissions to different profiles for a particular field.Write ...
Q: Write a program that will prompt the user to enter a sentence (string data), read that entire senten...
A: Given something from the client, the program will make a 3D shape out of it where the word will be e...
Q: What is the bare minimum in terms of processors and RAM necessary for the ATA Gateway to function pr...
A: Microsoft Advanced Threat Analytics (ATA) is an application to protect the organization against diff...
Q: What is the next step in deploying the GPO now that it has been created?
A: Introduction: To manage GPOs, first, go to the Group Policy Management Console tree, then choose "Ch...
Q: S b) concurrency contro in DBMS c) importance of concurrency control
A: given - a) transaction in DBMS b) concurrency contro in DBMS c) importance of concurrency contro
Q: What are CSV text files, and how do they work? What is a straightforward command that can be used to...
A: CSV text files: CSV text files are comma separated files. These files are simple text files in which...
Q: Suppose you have a polynomial-time algorithm that, given a multigraph H, computes the number of span...
A: Multigraph H. Number of spanning forests of H. Weighted graph G, Number of minimum spanning trees of...
Q: Discuss 3 examples of distributed applications, align your discussion for each in line with the char...
A: Answer: The following are three major examples of distributed systems. 1- Telephone communication: I...
Q: The rules of precedence for Boolean operators are: Boolean complement; Boolean product and Boolean s...
A: In This question, we are asked to solve two boolean algebra expressions V is OR ^ is AND
Q: Procedures (of policies and procedures) are: The same as policies. The rules specifying ...
A: The solution to the given problem is below.
Q: Tool validation is required: Annually. To mitigate attacks by opposing counsel. Be...
A: Ans: Tool validation is required: Annually: 1) To mitigate attacks by opposing counsel.
Q: sum and difference of two values) Write the C++ code for a program that allows the user to enter two...
A: #include <iostream> using namespace std; int main() { int x, y, sum, sub; cout << "Enter...
Q: Write a program that reads an integer and uses a single variable to add 5 to the integer, multiply b...
A: Given :- Write a program that reads an integer and uses a single variable to add 5 to the integer, ...
Q: b) Find the errors and correct them: 1) int sum 0;x; do{ cin<<x; Sumt-x;] while(x!-0.0) 2) (for int ...
A: 1) variable names are case sensitive in CPP. The correct code is: int sum=0,x; do{ cin>>x; sum...
Q: a) Assume a= 10, b-25 and c-15 solve and find the output of each of the following: x-b&c. (2) x-a^c....
A: Bitwise Operators: & (Bitwise AND Operator): Sets output bit to 1 if both bits are 1 Example: 10...
Q: WHO ARE THE BITCOIN VALUE CHAIN STAKEHOLDERS?
A: Many working experts were at first doubtful about blockchain innovation's true applications when it ...
Q: Question 6 (see above) Which of the following are equivalent to the statement "No librarians have ch...
A: Here is the explanation about the statements:
Q: Develop a process chart for installing a new memoryboard in your personal computer.
A: In supply chain management system flow line graph: This flowchart diagram is a diagram that depicts ...
Q: nding synaptic raw the comput
A: Artificial Neural Networks Question1. A neuron 'k' receives input from other four neurons, as 5, 3, ...
Q: Enter number of nodes 5 enter the x coordinate for node 3 enter the y coordinate for node 4 enter th...
A: point_1 = (1,2) point_2 = (4,7) def naive_euclidian_distance(point1, point2): d= [point1[...
Q: an the vertical intercept be attributed to measurement error?
A: yes ,vertical intercept be attributed to measurement error
Q: Find a bound for each recurrence below using Master Theorem: (a) T(n) = 3T(n=2) + n2 (b) T(n) = 2T...
A: The master method is a formula for solving recurrence relations of the type T(n) = aT(n/b) + f(n), w...
Q: Justify the following statement with the help of a suitable example: “In a class hierarchy of severa...
A: A virtual function is a member function which is declared within a base class and is re-defined or o...
Q: 2. A singer voice is sampled for 4 second by an 8-bit ADC at a sampling frequency of 10 kHz. The sam...
A: Given Sampling frequency=10kHz Number of bits n=8 bits Time = 4 sec i. Bit rate = Number of bits*Sam...
Q: ethod that takes a 2-dim array as the maximum number of ele
A: class Main { public static void main(String[] args) { // test data int[][] arr1 = {{1...
Q: peed dt 0.5 acceleration dt*2 ca
A:
Q: c# language Open Visual Studio IDE. Create new project and named the project as GreetingApp and the...
A: using System;class GreetingProgram{ static void Main() { /* User Input */ Cons...
Q: In physics, an object that is in motion is said to have kinetic energy. The follow. formula can be u...
A: PROGRAM EXPLANATION(C++): Include the header file. Define the main function. Take the mass of the o...
Q: Write the python program to display the following: Open and read the countrycities.csv file. Count ...
A: import csv import sys f = open('countrycities.csv') csvread = csv.reader(f) h = [] h= next(csvread) ...
Q: A common bus system which is capable of transferring 8 bits at time with number of registers are 2 e...
A: Given data, The number of registers are 4 Each register is of 8-bits Common bus transfers 8-bits at ...
Q: c) Instruction j Label is stored at 0x00400030, and Label is at instruction address 0x00400050. Enco...
A: MIPS assembly language includes two decision-making instructions, similar to an if statement with a ...
Q: to s
A: Response kit contains essential for rescuing of CPD/AED . This kit includes pocket mask of CPR, dou...
Q: Write a Java program to calculate the RMS velocity of oxygen molecule at 27deg C.
A: Here I ahve created the variable to store the value of R, T, and M. Next, I have calculated the RMS ...
Q: A major disadvantage of binary number system is that it requires________________________.
A: A major disadvantage of binary number system is that it requires a very large string of 1’s and 0’s ...
Q: Draw a recursion tree for a recurrence and use the Substitution Method to prove the solution. ( make...
A: For example consider the recurrence relation T(n) = T(n/4) + T(n/2) + cn2 cn2 ...
Q: For the Grammar {S → AS|a, A → SbA|SS|ba construct Leftmost deriyation for the strin
A: Lets see the solution.
Q: What influence does data mining have on personal security and privacy?
A: Introduction: Data extraction from data sets can be done using privacy-protected data mining (PPDM) ...
Q: 2. A singer voice is sampled for 4 second by an 8-bit ADC at a sampling frequency of 10 kHz. The sam...
A: Given Sampling frequency=10kHz Number of bits n=8 bits Time = 4 sec i. Bit rate = Number of bits*Sam...
Q: 3 per minute and each is expected to use the software for 20 minutes (1 student stops using the lice...
A: The answer is
Q: question from picture: 1-Define the inputs? 2-Define the processes involved ( Atleast 5 Process...
A: 1. Inputs: PIN Operation to perform Amount
Q: Write a program in C++ that will authenticate a password of 7586, if it is correct it prints "login ...
A: Please find the answer below
Q: Create a procedure for validating the software Encase is working correctly and that the hardware wri...
A: I have answered this question in step 2.
Q: Given a hard drive with the following characteristics: 1024 B sector 15,000rpm 4 ms average seek tim...
A: The rotational speed is 15000 rpm That is, 15000 rotation 60 second 1 rotation x seco...
Q: OOP Homework Inheritance (PYTHON) 1. Given two classes as described in Customer.py (attached) Revise...
A: class Sender: # Representing Sender and Recipient #Attributes nameSender = "" addr...
Q: A storage device may contain the following data types (choose all that apply): Bad blocks. ...
A: Solution :: A storage device may contain the following data types (choose all that apply): A) ...
Q: constants with different data types, then display their values. Provide a meaningful identifier of t...
A: CODE: C# PROGRAMMING LANGUAGE using System; namespace DataTypeApp { class DataTypeProgram { static...
Q: 11111101 NOR 1000001 0
A: Introduction: NOR Gate: The Logic NOR Gate output is only true when all of its inputs are false, oth...
Q: 4. When children visit play zone, at the entry gate their height and age should be checked. He/she s...
A: 4. Algorithm: Start Read height(in cm) and age of child If age<8 and height>122, display "All...
Q: 6. An undirected graph G =(V, E) is shown in the figure below. Find the (i) number of vertices, (ii)...
A: Below is the complete explanation about various graph properties like Vertices Edges Degree of vert...
Q: b) Write a C++ program to calculate the squares of the numbers from 1 to 20 using user defined and p...
A: I give the code in C++ along with output and code screenshot
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- 90.Create a java program that generates elements (randomly from 10 – 75) of a 2-dimensional array (5x5) using the Random Class then perform the following:1) Output the array elements2) Output the sum of prime numbers in the array3) Output the elements in the main diagonal.4) Output the sum of the elements below the diagonal.5) Output the sum of the elements above the diagonal.6) Output the odd numbers below the diagonal.7) Output the even numbers aboveWrite a Java to do the following USING ARRAYS MUST USE METHODS Arrays And Functions (Methods) hint write and test one module at the time 1) Input 15 integers (input validation , all numbers must be between -20 and 50 inclusive ) ,create a method/function. 2 methods/functions one for inputand one for input validation 2) Find and display all negative number in the array, create a method/function. 3) Display every other element in the array, create a method/function 4) Find the Sum of all positive numbers in the Array, create a method/function 5) a method/function to display the original array 6) include a menu using the switch statement to enable the user to select one of the the options (2,3,4). 7) include a loop to restart the menuCreate a java program that reads elements (randomly from 0 – 9) of a 2-dimensional array (5x5) using the Random Class then perform the following: 1) Output the array elements 2) Output the sum of each row. 3) Output the sum of each column. 4) Output the sum of all the elements. 5) Output the sum of prime numbers in the array 6) Output the sum of the elements in the main diagonal. 7) Output the sum of the elements below the diagonal. 8) Output the sum of the elements above diagonal. 9) Output the sum of odd numbers below the diagonal. 10) Output the sum of even numbers above the diagonal
- Create a java program that generates elements (randomly from 10 – 50) of a 2-dimensional array (5x5) using the Random Class then perform the following: 1) Output the array elements 2) Output the sum of prime numbers in the array 3) Output the elements in the main diagonal. 4) Output the sum of the elements below the diagonal. 5) Output the sum of the elements above the diagonal. 6) Output the odd numbers below the diagonal. 7) Output the even numbers above the diagonal.Requirements: Use Java Programming only. Show screenshots of your work. 13. Suppose that int [][] triangle = new int[3][]; Write several statements to initialize triangle[0] as {1, 2}; triangle[1] as {3, 4, 5}; and triangle[2] = {6, 7, 8, 9}; 14. Write public static int[] sums(int [][] arr) that returns an integer array, in which ith element is the sum of ith row of table arr. 15. Write public static boolean zeroDiagonal(int [][] arr) which returns true if the diagonal elements in table arr are all zeros.This needs to be done in JAVA!!! Create a program that performs the following one-dimensional-array operations: Create an array called counts. Add 1 to each of the 10 elements of array counts. Print out the values of the 10 elements. Create an array with the following values: 3, 7, 9, 12, 15. Multiple each of the 5 elements by 3. Print out the values of the 5 elements.
- Create a java program that generates elements (randomly from 10 – 75) of a 2-dimensional array (5x5) using the Random Class then perform the following:1) Output the array elements2) Output the sum of prime numbers in the array3) Output the elements in the main diagonal.4) Output the sum of the elements below the diagonal.5) Output the sum of the elements above the diagonal.6) Output the odd numbers below the diagonal.7) Output the even numbers above the diagonal. NOTE: Please do not use the array methods available on the internet. Use the for loop, while loop or do-while loop statement in your codes..This is a java program 1. Take an integer from user, generate that many fibonacci numbers and store in an array. Display the array.Sample output:Enter a number: 8First 8 Fibonacci numbers: 0 1 1 2 3 5 8 132. You will declare 3X4 2D array. Take user input to store the values in the array. Calculate summation of all the values and print the sum.JAVA PROGRAM Ask the user for the number of rows and columns of a two-dimensional array and then its integer elements. Rotate the array 90 degrees counter-clockwise and print the new result. Input 1. One line containing an integer for the number of rows The value is guaranteed to be >= 3 and <= 100. 2. One line containing an integer for the number of columns The value is guaranteed to be >= 3 and <= 100. 3. Multiple lines containing at least one integer each line for the elements of the array All elements are non-negative and are all less than 100 SAMPLE OUTPUT: Enter the number of rows: 4 Enter the number of columns: 4 Row #1: 1 3 3 4 Row #2: 5 6 7 8 Row #3: 9 10 10 12 Row #4: 12 14 17 16 4 8 12 16 3 7 10 17 3 6 10 14 1 5 9 12
- QUESTION 1 Write a Java program to do the following task: Input n from user. Create an array to store n double values. Initialize it with n random numbers ranging from 10.0 to 100.0 (both included). Pass the array to a method that calculates the sum of those n numbers. Print the sum in the method.(Using Java in eclipse) Write a complete program to check whether numbers in an array or prime or not. Your program should follow these steps: 1. Prompt user to determine how many numbers will be checked. 2. Prompt the user to enter that many whole numbers as input and store these 3. for each number is a separate method to check whether the number is prime, and display this information to the user. The output should look like the sample.CODE IN JAVA design a program that grades arithmetic quizzes as follows: (Use the below startup code for Quizzes.java and provide code as indicated by the comments) 1. Ask the user how many questions are in the quiz. 2. Use a for loop to load the array. Ask the user to enter the key (that is, the correct answers). There should be one answer for each question in the quiz, and each answer should be an integer. They can be entered on a single line, e.g., 34, 7, 13, 100, 8 might be the key for a 5-question quiz. You will need to store the key in an array called "key". 3. Ask the user to enter the student's answers for the quiz to be graded. There needs to be one answer for each question. Note that each answer can simply be compared to the key as it is entered. If the answer is correct, add 1 to a correct answer counter. need this in a separate for loop from the loop used to load the array. 4. When the user has entered all of the answers to be graded, print the number correct…