Write
Q: C++ code please (5) Implement the FindText() function, which has two strings as parameters. The firs...
A: The below given C++ program will obey the following rubrics: Importing essential header files. Decl...
Q: formal languages and computability Which of the listed statements are true for pushdown automata? ...
A: Finite Automata: Finite automata is a type of machine that is used to recognize the patterns in th...
Q: Compare crossbar, mesh, and ring networks in terms of speed and ability to scale to larger systems.
A: Interconnection Networks: Interconnection networks is defined as the network or the way in which v...
Q: Which is easier, routing with or without IP adresses?
A: Routing is easier via the IP addresses.Since, the IP address can be either dynamic or static in natu...
Q: JavaPlease only answer part 3 (iii) and 4 (iv)
A: Process of insertion:Step 1: Insert the new element 29 at the end. Step 2: Heapify the new element ...
Q: What is the output from this code if the user enters the letter b and ALL the break statements are r...
A: The modified code after removing the break statement is shown below -
Q: Use the properties and theorems of Boolean Algebra to reduce the following expression to OR-AND expr...
A: Properties for reducing the Boolean expression: De-Morgan’s Law: (A+B)'= A'.B' and (A.B)'=A'+B'. Com...
Q: Given a public class named DryEraseMarker which contains: • two private data member variables name...
A: A Java program for the given criteria is as follows, File name: “DryEraseMarker.java” import java.aw...
Q: Data Structure Add three methods to the following class
A: The static method add() takes two polynomials p1 and p2 as parameter. It finds the max matching degr...
Q: Trace the following code. Assume that a and b are stored at 20300 and 20308. Your trace table should...
A:
Q: I need some helping fixing my code for this method(in screenshot). Also could you explain tokens ple...
A: Note: In the below method, "FileReader" is used instead of "Scanner". "IOException" is used in the h...
Q: . Use Netbeans to run the following decorator pattern code. Provide screenshot to prove that the cod...
A: File name: “SpaceshipDetails.java” File name: “EbonHawk.java” File name: “Spaceship.java” Screensh...
Q: Identify the different technologies used for output devices.
A: Computer hardware or an output device is a device used to provide some output in the form of text, i...
Q: 27. _______________________________ Backup files cannot be saved to the same disk being backed up. A...
A: Backup files The backup files cannot be saved to the same disk being backed up. The files are saved...
Q: 2.a Fill in the function table below. The function volume() calculates the volume of a box (length x...
A: Function table Name Purpose Parameters Result Volume() Takes input values and return...
Q: Consider inserting the keys 10, 22, 31, 4, 15, 28, 17, 88, 59 into a hash table of length m = 11 usi...
A: Linear probing: The hash function for the linear probing is: h (k, i) = (h’ (k) + i) mod m where h’k...
Q: Differentiate between microprocessor and microcontroller. I want the answer in table format.
A: The difference between microprocessor and microcontroller is shown below -
Q: C++ program
A: Program code: //include the required header files #include <bits/stdc++.h> using namespace st...
Q: Write a C++ program that prompts the user to enter 10 names each with maximum of 30 characters. Outp...
A: Program code: //include the essential header files#include<iostream>using namespace std; //def...
Q: Is BGP more similar to RIP or OSFP? Why?
A: Border Gateway Protocol (BGP), Routing Information Protocol (RIP) and Open Shortest Path First (OSFP...
Q: • RectangleTest class:o Perform the following actions in the main method:▪ Create an object named r1...
A: Program package rectangle; class Rectangle { double length; double width; ...
Q: Accomplish the following for the given class diagram. Arithmetic - num1: int num2: int 1. Create the...
A: Program approach: Define the class named Arithmetic. Define the member variables. Define the parame...
Q: Write a public int method named initialNumberOfSticks which takes two int parameters named max_stick...
A: public int initialNumberOfSticks(int max_sticks, int min_sticks ) { Random r = new Rand...
Q: Fill in the membership table for the set in the expression AN(B – A) = Ø and determine if the equali...
A: Explanation: To prove: A∩(B-A)=∅ First compute (B-A). (B-A)={x:x belongs t...
Q: 13) A device called a terminator is placed at one end of the RJ 45 cable. a) True b) False c) It ...
A:
Q: 1. Design a java application that outputs a table with a list of at least 6bstudents together with t...
A: Hey, since there are multiple questions posted, we will answer first question. If you want any speci...
Q: Write and SQL query using the MAX operator to show all data from the Order Items table in which the ...
A: The Structured Query Language (SQL) query to display all the data from the Order items table in whic...
Q: Draw a UML class diagram for the following three classes to show their structures and relationships.
A: The class diagram is composed of three parts: Upper section: Name of the class - This section speci...
Q: Let A = {a, b, c, d, e}, and B = {c, e, f, g}. Find the following sets. Use a comma to separate memb...
A: a) Union: The union of two sets A and B is equal to the set of elements which are present in set X, ...
Q: Ok so I have been working on these two methods( I put my code in the screen shots) getLowestColumnIN...
A: Note: - As per our guidelines we can only answer one question at a time. Please resubmit the second ...
Q: Q4) In WAMPUS world, the AGENT has 5 sensors, list of them and write their function
A: The following are the 5 sensors used by the AGENT in WUMPUS world: Stench Breeze Glitter Bump Screa...
Q: Use DeMorgan’s theorems to convert the expression y= [RS’ T + Q’]’
A: DeMorgan’s theorem DeMorgan’s theorem states that (AB)1 = (A)1 + (B)1 ...
Q: Here is a Java program to get the sum of a Array of numbers. String[] numbers={"3", "5", "6", "9", "...
A: Given code String[] numbers={"3", "5", "6", "9", "10"}; // line 1 int sum=0; // line 2 for (int i=...
Q: C++ program
A: Program: #include <iostream> #include <cmath> using namespace std; void calculate(floa...
Q: public class SharedCounter {int counter = 0;public static void main(String [] args) throws Interrupt...
A: Threads in java: A thread in java, is the independent path of the execution in a program. Many threa...
Q: 60) __________________ Anomaly recognition usually causes more false positives than signature based ...
A: More false positives An anomaly recognition system is an intrusion detection system for detecting b...
Q: For what types of system are agile approaches to development particularly likely to be successful?
A: Agile approaches: Agile methodology is a type of project management process. Agile mainly used for ...
Q: Count the number of vowels in the file and return the result for each: Output would look like this:...
A: Since here no programming language is specified. So, we are providing the program code in C. The bel...
Q: Describe whether the graph has an Euler circuit. If the graph has an Euler circuit, find one such ci...
A: Closed Trail: A closed tail is an alternating sequence of vertices and edges where vertices can repe...
Q: For a C++ program
A: Programming instructions: Include necessary header files to compute equations. Create a main functi...
Q: LTtZ|J/ 2/ turtle.right(180) tee2(S/2) turtle.left(90) turtle.back(S) def tee2(S): turtle.forward(S)...
A: The program defines a single function tee( ), which accepts two parameter: S: The height of the cur...
Q: Given the disjoint set array shown, what would the array look like after a find(10) if path compress...
A: Given disjoint set array: The tree for above array is as follows:
Q: Write a program to calculate the sum of even numbers and sum of the squares of even numbers ranging ...
A: Program Approach - Include the important header files for the program. Define the main function. De...
Q: 1 a) What layer of the OSI model does the ARP protocol best belong to? b) What command is used in th...
A: The OSI(Open Systems Interconnection) model is a set of protocols that allows any two different devi...
Q: Write a c++ program using arrays that will allow two users to play tic-tac-toe. The program should a...
A: Program //include the required header files #include <iostream> //std namespace using std::cou...
Q: What happens to the data displayed by a view when the view is deleted?
A: Nothing will happen to the data displayed by a view, if the view is deleted.
Q: 4. Problem Description: There are 6 classes including Person, Student, Employee, Faculty, and Staf...
A: The given criteria is explained using the below Unified Modeling Language (UML) class diagram, Expl...
Q: Explain the advantages of a declarative language over an imperative language or a functional languag...
A: Declarative language: It is a functional oriented and based on the result one wants to produce. No ...
Q: Give an example where a functional language is significantly superior to an imperative language on s...
A: Functional languages follow the principles of functional programming. It focuses on pure functions g...
Q: Please write down the output of following code: ArrayList<String> list = new ArrayList<Stri...
A: Given code ArrayList<String> list = new ArrayList<String>(); list.add("10"); list.add("2...
(Maximum element in an array)
Implement the following method that returns the maximum element in an array .
public static > E max (E[] list)
Write a test program that prompts the user to enter 10 integers, invokes this method to find the max.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- 7). (Sum ArrayList) Write the following method that returns the sum of all numbers in an ArrayList: public static double sum(ArrayList<Double> list) Note:- Please write a java code and also need an output for this program. (Also, let me know with what name file should be saved to get output)3. (Eliminate duplicates) Write a method that returns a new array by eliminating the duplicate values in the array using the following method header: public static int[] eliminate Duplicates (int[] list) Write a test program that reads in ten integers, invokes the method, and displays the result.1. (Find the smallest element) Write a method that finds the smallest element in an array of double values using the following header: public static double min(double[] array) Write a test program that prompts the user to enter ten numbers, invokes this method to return the minimum value, and displays the minimum value.
- (Random sentences and story writer) Write an app that uses random-number generation to create sentences. Use four arrays of strings, called article, noun, verb andprepostion. Create a sentence by selecting a word at random from each array in the following order: article, noun, verb, preposition, article, noun.As each word is picked, concatenate it to the previous words in the sentence. The words should be separated by spaces. When the sentence is output, it should start witha capital letter and end with a period. The program should generate 10 sentences and output them to a text box. The arrays should be filled as follows:The article array should contain the articles "the", "a", "one", "some" and "any";The noun array should contain the nouns "boy", "girl", "dog", "town", "car";The verb array should contain the past tense verbs "drove", "jumped", "ran", "walked" and "skipped";The preposition array should contain the preposotions "to", "from", "over", "under" and "on";(in Java language) Write a method that is inspired by a photo app that does the following. Ask the user to enter a size of array between 2 to 10. Based on the size entered, write a loop which asks the user to fill values into an integer array. Print the array contents using Arrays.toString(). For this integer array, write a logic that returns true if there exists a place to split the array such that the sum of the numbers on one side is equal to the sum of the numbers on the other. Otherwise return false. Examples: If the array is {1, 1, 1, 2, 1} then return true. If the array is {2, 1, 1, 2, 1} then return false If the array is {10, 10} then return true.(Average the major diagonal in a matrix) Write a method that averages all the numbers in the major diagonal in an n * n matrix of double values using the following header: public static double averageMajorDiagonal(double[][] m) Write a test program that reads a 4-by-4 matrix and displays the average of all its elements on the major diagonal.
- 7). (Sum ArrayList) Write the following method that returns the sum of all numbers in an ArrayList: public static double sum(ArrayList<Double> list)(Sum elements row by row) write a method that returns the sum of all the elements in a specified row in a matrix using the following header: public static double sumRow(double [][] m, int rowIndex) Write a test program that reads a 3-by-4 matrix and displays the sum of each row here is a sample run.(Sort three numbers) Write the following function to display three numbers in increasing order: def displaySortedNumbers(num1, num2, num3): Write a test program that prompts the user to enter three numbers and invokes the function to display them in increasing order. Here are some sample runs:
- (Write in java) Declare an array that represents 100 students. Assign twodifferent questions between 1 and 20 randomly to eachstudent. Display the students’ questions for each student(Find the index of the largest element) Write a function that returns the index of the largest element in an array of integers. If there are more such elements than one, return the largest index. Use the following header: int indexOfLargestElement(double array[], int size)(IN JAVA) Write a method which does the following: Ask the user to enter a size of array between 2 to 10. Based on the size entered, write a loop which asks the user to fill values into an integer array. Print the array contents using Arrays.toString(). For this integer array, write a logic that returns true if there exists a place to split the array such that the sum of the numbers on one side is equal to the sum of the numbers on the other. Otherwise return false. Examples: If the array is {1, 1, 1, 2, 1} then return true. If the array is {2, 1, 1, 2, 1} then return false If the array is {10, 10} then return true.