Browse W
Alphabetical listing with fast deep pagination.
66619 items • Page 1036 / 1333
Write a method that returns the area of a triangle using the following header: p
Write a method that returns the area of a triangle using the following header: public static double getTriangleArea(double[][] points) The points are stored in a 3-by-2 two-dimens…
Write a method that returns the index of the smallest element in an array of int
Write a method that returns the index of the smallest element in an array of integers. If the number of such elements is greater than 1, return the smallest index. Use the followi…
Write a method that returns the maximum of two integers that are passed in as ar
Write a method that returns the maximum of two integers that are passed in as arguments. The method would have the following header: public static int max(int num1, int num2) Writ…
Write a method that returns the union of two array lists of integers using the f
Write a method that returns the union of two array lists of integers using the following header: public static ArrayList union( ArrayList list1, ArrayList list2 ) For example: The…
Write a method that returns the union of two array lists of integers using the f
Write a method that returns the union of two array lists of integers using the following header: public static ArrayList union( ArrayList list1, ArrayList list2 ) For example: The…
Write a method that searches a string in ArrayList. If the string is in the Arra
Write a method that searches a string in ArrayList. If the string is in the ArrayList, the index will be return, otherwise, return -1. Consider the following code ArrayList<Str…
Write a method that starts with a single linked list of integers and a special v
Write a method that starts with a single linked list of integers and a special value called the splitting value (or pivot). The elements of the list are in no particular order. Th…
Write a method that stores an integer. Each time the method is called, increment
Write a method that stores an integer. Each time the method is called, increment the integer by 1. Create three threads that call this method 1000 times each, storing the returned…
Write a method that takes 3 parameters: 2 double, (num1 and num2) and 1 char (ty
Write a method that takes 3 parameters: 2 double, (num1 and num2) and 1 char (type), in that order, and returns a double value (rounded to two decimal places - use Math.round()) d…
Write a method that takes a String as input and returns the reverse of that Stri
Write a method that takes a String as input and returns the reverse of that String. Then write a second method that uses the first method to test whether or not an input String is…
Write a method that takes a String as input and returns the reverse of that Stri
Write a method that takes a String as input and returns the reverse of that String. Then write a second method that uses the first method to test whether or not an input String is…
Write a method that takes a parameter for the number of minutes parked (you can
Write a method that takes a parameter for the number of minutes parked (you can assume it's a whole number and returns the appropriate short-term parking charge, in dollars. Assum…
Write a method that takes an array (A) of integers number as parameter, splits A
Write a method that takes an array (A) of integers number as parameter, splits A into two arrays B and C as follow, then prints B and C. Example: A 4 65 23 94 12 56 33 89 34 23 B …
Write a method that takes two string arrays as input parameters and returns a bo
Write a method that takes two string arrays as input parameters and returns a boolean value indicating if the strings in corresponding locations of the two arrays are identical or…
Write a method that takes two string arrays as input parameters and returns a bo
Write a method that takes two string arrays as input parameters and returns a boolean value indicating if the strings in corresponding locaitons of the two arrays are identical or…
Write a method that uses a divide-and-conquer strategy to find the maximum value
Write a method that uses a divide-and-conquer strategy to find the maximum value in an integer array. The maximum value of a one-element array is that element. The maximum of any …
Write a method that uses a divide-and-conquer strategy to find the maximum value
Write a method that uses a divide-and-conquer strategy to find the maximum value in an integer array. The maximum value of a one-element array is that element. The maximum of any …
Write a method that will convert a temperature in Fahrenheit to Kelvin. The meth
Write a method that will convert a temperature in Fahrenheit to Kelvin. The method will be given the temperature in Fahrenheit, and must return the temperature in Kelvin. The form…
Write a method that will convert a temperature in Fahrenheit to Kelvin. The meth
Write a method that will convert a temperature in Fahrenheit to Kelvin. The method will be given the temperature in Fahrenheit, and must return the temperature in Kelvin. The form…
Write a method that will convert the supplied number from Celcius to Fahrenheit
Write a method that will convert the supplied number from Celcius to Fahrenheit or from Fahrenheit to Celcius depending on whether the variable toMetric is true If it is then conv…
Write a method that will delete from a linked list of integers the node that con
Write a method that will delete from a linked list of integers the node that contains the largest integer. Can you do this with a single traversal of the list?
Write a method that will have a C++ string passed to it. The string will be an e
Write a method that will have a C++ string passed to it. The string will be an email address and the method will return a bool to indicate that the email address is valid. Email V…
Write a method to compute and return the value of max - min where max is the lar
Write a method to compute and return the value of max - min where max is the largest element of an int array and min is the smallest element of an int array. The method is passed …
Write a method to compute the average of an int array and return the value as a
Write a method to compute the average of an int array and return the value as a double. The int array and the number of elements in the array are both passed as parameters to the …
Write a method to compute the average of the elements of an int array and return
Write a method to compute the average of the elements of an int array and return the value as a double. The method header is below. The int array and the number of elements in the…
Write a method to compute the average of the elements of an int array and return
Write a method to compute the average of the elements of an int array and return the value as a double. The method header is: public double calculateAverage(int[] nums, int numEle…
Write a method to display a big \"X\" using ascii characters. The method header
Write a method to display a big "X" using ascii characters. The method header is: public static void display(int n) where the n is how many rows tall it is. You can use this code …
Write a method to implement back substitution using guassian elimination public
Write a method to implement back substitution using guassian elimination public Matrix Backsubstitution(Matrix A, Matrix b){ //Create a matrix to store our result //Find the value…
Write a method to implement operator++ for the Complex class. This method should
Write a method to implement operator++ for the Complex class. This method should result in the number having one added to the real component and return the new value of the number…
Write a method to prompt the user to choose a password. The password must contai
Write a method to prompt the user to choose a password. The password must contain at least one uppercase letter, one lowercase letter, one digit, and one special character (define…
Write a method to recover all subset sum solution from the table below. The prot
Write a method to recover all subset sum solution from the table below. The prototype is int[][] recover(int S, int[][] M, int t) M is the table that hold number of solution of su…
Write a method to retrieve Employee objects from a HashMap. The method takes in
Write a method to retrieve Employee objects from a HashMap. The method takes in a HashMap that holds take in a HashMap that holds Employee objects hashed by their employee ID. The…
Write a method to retrieve Employee objects from a HashMap. The method takes in
Write a method to retrieve Employee objects from a HashMap. The method takes in a HashMap that holds take in a HashMap that holds Employee objects hashed by their employee ID. The…
Write a method to save a Linked List to a text file called file.txt. It must sav
Write a method to save a Linked List to a text file called file.txt. It must save the Linked List to the file with each node on a different line. Here is the Linked List LinkedLis…
Write a method to sort the elements of a poset consisting of positive integers t
Write a method to sort the elements of a poset consisting of positive integers topologically with respect to the operation of divisibility. The input parameter of the method is an…
Write a method to swap element (not data) in the following skiplist with test me
Write a method to swap element (not data) in the following skiplist with test method. package ods; import java.lang.reflect.Array; import java.lang.IllegalStateException; import j…
Write a method toString2 for a binary tree of integers. (On your section handout
Write a method toString2 for a binary tree of integers. (On your section handout the method is called toString, but Practice-It needs you to call your method toString2 because toS…
Write a method verifyHeights() of class AvlTree (from the following source code)
Write a method verifyHeights() of class AvlTree (from the following source code) that runs in O(n) time and verifies that the height information in an AVL tree is correctly mainta…
Write a method void listAllFiles (File dir) that recursively displays a list of
Write a method void listAllFiles (File dir) that recursively displays a list of a directory's files and subdirectories. An example is illustrated below. Note the following in the …
Write a method void listAllFiles(File dir) that recursively displays a list of a
Write a method void listAllFiles(File dir) that recursively displays a list of a directory's files and subdirectories. An example is illustrated below. Note the following in the o…
Write a method which accepts an array of integers, A, and an integer, k, as a pa
Write a method which accepts an array of integers, A, and an integer, k, as a parameter. The method should perform a circular shift of the elements of A to the left by k positions…
Write a method which validates a password in JAVA. Then write a program in JAVA
Write a method which validates a password in JAVA. Then write a program in JAVA that prompts the user to enter a password (and verify it). Your program will call your method to va…
Write a method with the following header to display three numbers in increasing
Write a method with the following header to display three numbers in increasing order: public static void display SortedNumbers(double num1, double num2, double num3) You will als…
Write a method with the following header which generates a random card by random
Write a method with the following header which generates a random card by randomly generating integers in the appropriate ranges for the card’s kind and suit. (Note that zero is v…
Write a method with the method header below. This method takes an array of Strin
Write a method with the method header below. This method takes an array of Strings and a position. The method should return the String at that position. For example, sending ["hel…
Write a method writeSequence that accepts an integer n as a parameter and prints
Write a method writeSequence that accepts an integer n as a parameter and prints a symmetric sequence of n numbers with descending integers ending in 1 followed by ascending integ…
Write a method writeSequence that accepts an integer n as a parameter and prints
Write a method writeSequence that accepts an integer n as a parameter and prints a symmetric sequence of n numbers with descending integers ending in 1 followed by ascending integ…
Write a method writeSquares that takes an integer n as a parameter and that writ
Write a method writeSquares that takes an integer n as a parameter and that writes the first n squares to System.out separated by commas with the odd squares in descending order f…
Write a method zip that accepts twolinked lists of integers (with header nodes)
Write a method zip that accepts twolinked lists of integers (with header nodes) and interleaves thetwo lists, e.g., if you give it the two lists 4, 6, 7, 2 and 2, 8,5, 1 it return…
Write a method(in java)which takes an ArrayList of integers as input and compute
Write a method(in java)which takes an ArrayList of integers as input and computes a new ArrayList whose 0th entry is 1, whose ith entry is the sum of the i1st entry and ith entry …