Browse W
Alphabetical listing with fast deep pagination.
66619 items • Page 1031 / 1333
Write a method called quadratic that solves quadratic equations and prints their
Write a method called quadratic that solves quadratic equations and prints their roots. Recall that a quadratic equation is a polynomial equation in terms of a variable x of the f…
Write a method called removeInRange that accepts four parameters: an ArrayList o
Write a method called removeInRange that accepts four parameters: an ArrayList of integers, an element value, a starting index, and an ending index. The method's behavior is to re…
Write a method called removeInRange that accepts four parameters: an ArrayList o
Write a method called removeInRange that accepts four parameters: an ArrayList of integers, an element value, a starting index, and an ending index. The method's behavior is to re…
Write a method called removeInRange that accepts three parameters, an ArrayList
Write a method called removeInRange that accepts three parameters, an ArrayList of Strings, a beginning String, and an ending String, and removes from the list any Strings that fa…
Write a method called reverse that accepts a map from strings to strings as a pa
Write a method called reverse that accepts a map from strings to strings as a parameter and returns a new map that is the reverse of the original. The reverse of a map is a new ma…
Write a method called rmchars(), which is passed a String s and a char c. The me
Write a method called rmchars(), which is passed a String s and a char c. The method returns a new String which is just like s, but with any instance of the character c removed. F…
Write a method called runningTotal that returns a new ArrayIntList that contains
Write a method called runningTotal that returns a new ArrayIntList that contains a running total of the original list. In other words, the ith value in the new list should store t…
Write a method called sort(int[] v) which takes an integer arrayand sorts the ar
Write a method called sort(int[] v) which takes an integer arrayand sorts the array in increasing order. Note that the methodshould sort the array given, not create any new arrays…
Write a method called stackSum that returns an int and has no parameters which w
Write a method called stackSum that returns an int and has no parameters which will find the sum of a stack using a recursive technique and leave the stack unchanged. Test the met…
Write a method called stackSum that returns an int and has no parameters which w
Write a method called stackSum that returns an int and has no parameters which will find the sum of a stack using a recursive technique and leave the stack unchanged. Test the met…
Write a method called stripComments that accepts a Scanner representing an input
Write a method called stripComments that accepts a Scanner representing an input file containing a Java program as its parameter, reads that file, and then prints the file's text …
Write a method called stripHtmlTags that accepts a Scanner representing an input
Write a method called stripHtmlTags that accepts a Scanner representing an input file containing an HTML web page as its parameter, then reads that file and prints the file's text…
Write a method called ten2one(), that takes no input parameters, and returns not
Write a method called ten2one(), that takes no input parameters, and returns nothing (void). The body of the method must include a loop that counts from 10 down to 1, printing the…
Write a method called transferFrom that accepts a second linked list as paramete
Write a method called transferFrom that accepts a second linked list as parameter and that moves values from the second list to this list. You are to attach the second list's elem…
Write a method called validateDate that takes a single String argument and check
Write a method called validateDate that takes a single String argument and checks whether this String is a valid date in the form mm/dd/yyyy. Your method should throw an InvalidDa…
Write a method called what Towear that receives a double number temp for current
Write a method called what Towear that receives a double number temp for current temperature, and a Boolean raincheck for current rain possibility and returns astring with a phras…
Write a method called wordLengths that accepts a Scanner for an input file as it
Write a method called wordLengths that accepts a Scanner for an input file as its parameters. Your method should open the given file, count the number of letters in each taken in …
Write a method called wordLengths that accepts a Scanner representing an input f
Write a method called wordLengths that accepts a Scanner representing an input file as its argument. Your method should read from the given file, count the number of letters in ea…
Write a method called wordLengths that accepts a Scanner representing an input f
Write a method called wordLengths that accepts a Scanner representing an input file as its argument. Your method should read from the given file, count the number of letters in ea…
Write a method called wordLengths that accepts a Scanner representing an input f
Write a method called wordLengths that accepts a Scanner representing an input file as its argument. Your method should read from the given file, count the number of letters in ea…
Write a method called wordLengths that accepts a Scanner representing an input f
Write a method called wordLengths that accepts a Scanner representing an input file as its argument. Your method should read from the given file, count the number of letters in ea…
Write a method called wordLengths that accepts a string for the name of a file a
Write a method called wordLengths that accepts a string for the name of a file as a parameter. Your method should open the given file, count the number of letters in every token i…
Write a method called wordWrap that accepts a Scanner representing an input file
Write a method called wordWrap that accepts a Scanner representing an input file as its parameter and outputs each line of the file to the console, word-wrapping all lines that ar…
Write a method called wordWrap that accepts a Scanner representing an input file
Write a method called wordWrap that accepts a Scanner representing an input file as its parameter and outputs each line of the file to the console, word-wrapping all lines that ar…
Write a method called wordWrap that accepts a Scanner representing an input file
Write a method called wordWrap that accepts a Scanner representing an input file as its parameter and outputs each line of the file to the console, word-wrapping all lines that ar…
Write a method called wordWrap that accepts a Scanner representing an input file
Write a method called wordWrap that accepts a Scanner representing an input file as its parameter and outputs each line of the file to the console, word-wrapping all lines that ar…
Write a method called wordWrap that accepts a Scanner representing an input file
Write a method called wordWrap that accepts a Scanner representing an input file as its parameter and outputs each line of the file to the console, word-wrapping all lines that ar…
Write a method called writeLessThan void writeLessThan(T searchElement) Your met
Write a method called writeLessThan void writeLessThan(T searchElement) Your method should gather the elements(use any collection for this array or an arraylist) that are less tha…
Write a method called writeNames that takes two parameters an array of Strings (
Write a method called writeNames that takes two parameters an array of Strings (nameArray) and a String (fileName), and returns nothing. Write the array of Strings (names) to a te…
Write a method called writeSequence that accepts an integer n as a parameter and
Write a method called writeSequence that accepts an integer n as a parameter and prints to the console a symmetric sequence of n numbers composed of descending integers that ends …
Write a method center that takes a string st and a field size width and returns
Write a method center that takes a string st and a field size width and returns a centered version of the string within the given field. Add spaces to each side of st to center it…
Write a method cleanCorruptData that accepts an Array List of integers and remov
Write a method cleanCorruptData that accepts an Array List of integers and removes any adjacent pair of integers in the list if the left element of the pair is smaller than the ri…
Write a method combineArray which has four parameters. The first two parameters
Write a method combineArray which has four parameters. The first two parameters are String arrays. The last two parameters are integers, which represent the positions where we wil…
Write a method compare that compare two arrays of int values. Your method should
Write a method compare that compare two arrays of int values. Your method should take two int arrays as parameters. It should return true if the two arrays are of the same length …
Write a method copyStack that takes a stack of integers as a parameter and retur
Write a method copyStack that takes a stack of integers as a parameter and returns a copy of the original stack (i.e., a new stack with the same values as the original, stored in …
Write a method copyStack that takes a stack of integers as a parameter and retur
Write a method copyStack that takes a stack of integers as a parameter and returns a copy of the original stack (i.e., a new stack with the same values as the original, stored in …
Write a method countBinary that accepts an integer n as a parameter and that pri
Write a method countBinary that accepts an integer n as a parameter and that prints all binary numbers that have n digits in ascending order, printing each value on a separate lin…
Write a method countEmpty that returns the number of empty branches in a tree. A
Write a method countEmpty that returns the number of empty branches in a tree. An empty tree is considered to have one empty branch (the tree itself). For non-empty trees, your me…
Write a method countEmpty that returns the number of empty branches in a tree. A
Write a method countEmpty that returns the number of empty branches in a tree. An empty tree is considered to have one empty branch (the tree itself). For non-empty trees, your me…
Write a method countLeftNodes that returns the number of left children in the tr
Write a method countLeftNodes that returns the number of left children in the tree. A left child is a node that appears as the root of the left-hand subtree of another node. An em…
Write a method countNodes() of class RedBlackTree (from http://users.cis.fiu.edu
Write a method countNodes() of class RedBlackTree (from http://users.cis.fiu.edu/~weiss/dsaajava2/code/RedBlackTree.java) that runs in O(n) time and counts the number of red and b…
Write a method countToBy that accepts integer parameters n and m and that produc
Write a method countToBy that accepts integer parameters n and m and that produces output indicating how to count to n in increments of m separated by commas. For example, to coun…
Write a method countToBy that accepts integer parameters n and m and that produc
Write a method countToBy that accepts integer parameters n and m and that produces output indicating how to count to n in increments of m separated by commas. For example, to coun…
Write a method dominant that accepts three integers as parameters and returns tr
Write a method dominant that accepts three integers as parameters and returns true if any one of the three integers is larger than the sum of the other two integers. The integers …
Write a method duplicateStack that returns a new stack containing the same eleme
Write a method duplicateStack that returns a new stack containing the same elements and in the same order as the stack specified in the parameter. The method should create a new s…
Write a method equals that could be added to the IntTree class. (On your handout
Write a method equals that could be added to the IntTree class. (On your handout this method is called "equals", but Practice-It needs to use the name "equals" for another purpose…
Write a method evenDigits that accepts an integer parameter n and that returns t
Write a method evenDigits that accepts an integer parameter n and that returns the integer formed by removing the odd digits from n. The following table shows several calls and th…
Write a method evens that accepts an integer parameter n and that returns the in
Write a method evens that accepts an integer parameter n and that returns the integer formed by removing the odd digits from n. The following table shows several calls and their e…
Write a method for solving a quadratic equation using the following header: publ
Write a method for solving a quadratic equation using the following header: public static int solveQuadratic(double[] eqn, double[] roots) The coefficients of a quadratic equation…
Write a method for the LinkedList class that inserts int data into the list in a
Write a method for the LinkedList class that inserts int data into the list in ascending order. Therefore,if we insert the int 7 into the linked list 2 -> 4 - >6 -> 10 -&…