Browse W
Alphabetical listing with fast deep pagination.
66619 items • Page 1033 / 1333
Write a method named countEvenDigits that accepts an integer parameter and retur
Write a method named countEvenDigits that accepts an integer parameter and returns the number of even digits in that integer. An even digit is one whose value is either 0, 2, 4, 6…
Write a method named digitRange that accepts an integer as a parameter and retur
Write a method named digitRange that accepts an integer as a parameter and returns the range of values of its digits. The range is defined as 1 more than the difference between th…
Write a method named doubleSpace that accepts a Scanner for an input file and a
Write a method named doubleSpace that accepts a Scanner for an input file and a PrintStream for an output file as its parameters, writing into the output file a double-spaced vers…
Write a method named enough time for lunch that accepts four integers hour 1, mi
Write a method named enough time for lunch that accepts four integers hour 1, minute 2, hour2, and minute2 as parameters. Each pair of parameters represents a time on the 24-hour …
Write a method named equals that accepts two arrays of integers as parameters an
Write a method named equals that accepts two arrays of integers as parameters and returns true if they contain exactly the same elements in the same order, and false otherwise. No…
Write a method named evenNumbers that accepts a Scanner as a parameter reading i
Write a method named evenNumbers that accepts a Scanner as a parameter reading input from a file containing a series of integers, and report various statistics about the integers.…
Write a method named evenNumbers that accepts a Scanner as a parameter reading i
Write a method named evenNumbers that accepts a Scanner as a parameter reading input from a file containing a series of integers, and report various statistics about the integers.…
Write a method named fallingDistance that accepts an object%u2019s falling time
Write a method named fallingDistance that accepts an object%u2019s falling time (in seconds) as an argument. The method should return the distance (in meters) that the object has …
Write a method named find Middle Letter that is passed a String parameter and th
Write a method named find Middle Letter that is passed a String parameter and that returns the middle letter of the string. If the length of the parameter is odd then the middle l…
Write a method named findHtmlTags that accepts aScanner. The Scanner parameter r
Write a method named findHtmlTags that accepts aScanner. The Scanner parameter represents an input file. Yourmethod should read the file, assuming that the file contains anHTML we…
Write a method named flipLines that accepts as its parameter a Scanner for an in
Write a method named flipLines that accepts as its parameter a Scanner for an input file and that writes to the console the same file's contents with successive pairs of lines rev…
Write a method named flipLines that accepts as its parameter a Scanner for an in
Write a method named flipLines that accepts as its parameter a Scanner for an input file and that writes to the console the same file's contents with successive pairs of lines rev…
Write a method named getNums: Write a method named getNums which will fill an ar
Write a method named getNums: Write a method named getNums which will fill an array with positive integers (including zero). The array which is to be filled should be passed to th…
Write a method named hasMidpoint that accepts three integers as parameters and r
Write a method named hasMidpoint that accepts three integers as parameters and returns true if one of the integers is the midpoint between the other two integers; that is, if one …
Write a method named indexOf that returns the index of a particular value in an
Write a method named indexOf that returns the index of a particular value in an array of integers. The method should return the index of the first occurrence of the target value i…
Write a method named inputStats that takes a Scanner representing a file as a pa
Write a method namedinputStatsthat takes aScannerrepresenting a file as a parameter and that reports various statistics about the file's text. In particular, your method should re…
Write a method named isAllVowels that returns whether a String consists entirely
Write a method namedisAllVowelsthat returns whether aStringconsists entirely of vowels (a, e, i, o, or u, case-insensitively). If every character of theStringis a vowel, your meth…
Write a method named isAllVowels that returns whether a String consists entirely
Write a method named isAllVowels that returns whether a String consists entirely of vowels (a, e, i, o, or u, case-insensitively). If every character of the String is a vowel, you…
Write a method named isAnagram and a program that uses the method to determine i
Write a method named isAnagram and a program that uses the method to determine if two words are anagrams. If the two words are anagrams, the method will return a true; otherwise, …
Write a method named isUnique that takes an array of integers as a parameter and
Write a method named isUnique that takes an array of integers as a parameter and that returns a boolean value indicating whether or not the values in the array are uni…
Write a method named isUnique that takes an array of integers as a parameter and
Write a method named isUnique that takes an array of integers as a parameter and that returns a boolean value indicating whether or not the values in the array are uni…
Write a method named isUnique that takes an array of integers as a parameter and
Write a method named isUnique that takes an array of integers as a parameter and that returns a boolean value indicating whether or not the values in the array are unique (true fo…
Write a method named longestSortedSequence that accepts an array of integers as
Write a method named longestSortedSequence that accepts an array of integers as a parameter and that returns the length of the longest sorted (nondecreasing) sequence of integers …
Write a method named matrixAdd that accepts a pair of two-dimensional arrays of
Write a method named matrixAdd that accepts a pair of two-dimensional arrays of integers as parameters, treats the arrays as 2D matrices and adds them, returning the result. The s…
Write a method named matrixAdd that accepts a pair of two-dimensional arrays of
Write a method named matrixAdd that accepts a pair of two-dimensional arrays of integers as parameters, treats the arrays as 2D matrices and adds them, returning the result. The s…
Write a method named max0ccurrences that accepts a list of integers as a paramet
Write a method named max0ccurrences that accepts a list of integers as a parameter and returns the number of times the most frequently occurring integer (the "mode") occurs in the…
Write a method named maxElement which return the largest value in array. Have us
Write a method named maxElement which return the largest value in array. Have user input 6 numbers. How do I correct the error in line 15-23 stating class interface, or enum expec…
Write a method named minGap (hat accepts an integer array as a parameter and ret
Write a method named minGap (hat accepts an integer array as a parameter and returns the minimum 'gap' between adjacent values in the array. The gap between two adjacent values in…
Write a method named minGap that accepts an integer array as a parameter and ret
Write a method named minGap that accepts an integer array as a parameter and returns the minimum 'gap' between adjacent values in the array. The gap between two adjacent values in…
Write a method named minGap that accepts an integer array as a parameter and ret
Write a method named minGap that accepts an integer array as a parameter and returns the minimum 'gap' between adjacent values in the array. The gap between two adjacent values in…
Write a method named mode that returns the most frequently occurring element of
Write a method named mode that returns the most frequently occurring element of an array of integers. Assume that the array has at least one element and that every element in the …
Write a method named monthApart that accepts four integer parameters representin
Write a method named monthApart that accepts four integer parameters representing two calendar dates. Each date consists of a month (1 through 12) and a day (1 through the number …
Write a method named monthApart that accepts four integer parameters representin
Write a method named monthApart that accepts four integer parameters representing two calendar dates. Each date consists of a month (1 through 12) and a day (1 through the number …
Write a method named negativeSum that accepts a Scanner as a parameter reading i
Write a method named negativeSum that accepts a Scanner as a parameter reading input from a file containing a series of integers, and determine whether the sum starting from the f…
Write a method named negativeSum that accepts a Scanner as a parameter reading i
Write a method named negativeSum that accepts a Scanner as a parameter reading input from a file containing a series of integers, and determine whether the sum starting from the f…
Write a method named negativeSum that accepts a Scanner as a parameter reading i
Write a method named negativeSum that accepts a Scanner as a parameter reading input from a file containing a series of integers, and determine whether the sum starting from the f…
Write a method named partition that accepts an array of integers a and an intege
Write a method named partition that accepts an array of integers a and an integer element value v as its parameters, and rearranges ("partitions") the array's elements so that all…
Write a method named printDuplicates that accepts as its parameter a Scanner for
Write a method named printDuplicates that accepts as its parameter a Scanner for an input file containing a series of lines. Your method should examine each line looking for conse…
Write a method named printGPA that calculates a student\'s grade point average.
Write a method named printGPA that calculates a student's grade point average. The user will type a line of input containing the student's name, then a number of scores, followed …
Write a method named printGrid that accepts two integer parameters rows and cols
Write a method named printGrid that accepts two integer parameters rows and cols. The output is a comma-separated grid of numbers where the first parameter (rows) represents the n…
Write a method named printGrid that accepts two integer parameters rows and cols
Write a method named printGrid that accepts two integer parameters rows and cols. The output is a comma-separated grid of numbers where the first parameter (rows) represents the n…
Write a method named printGrid that accepts two integer parameters rows and cols
Write a method named printGrid that accepts two integer parameters rows and cols. The output is a comma-separated grid of numbers where the first parameter (rows) represents the n…
Write a method named printMultiples that takes an integer n and an integer m as
Write a method named printMultiples that takes an integer n and an integer m as parameters and that prints a complete line of output reporting the first m multiples of n. For exam…
Write a method named printMultiples that takes an integer n and an integer m as
Write a method named printMultiples that takes an integer n and an integer m as parameters and that prints a complete line of output reporting the first m multiples of n. For exam…
Write a method named randomX that keeps printing lines, where each line contains
Write a method named randomX that keeps printing lines, where each line contains a random number of x characters between 5 and 19 inclusive, until it prints a line with 16 or more…
Write a method named readEntireFile that accepts a Scanner representing an input
Write a method named readEntireFile that accepts a Scanner representing an input file as its parameter, then reads that file and returns the entire text contents of that file as a…
Write a method named remove which should a given value from an array of integers
Write a method named remove which should a given value from an array of integers. The method should return a new array which contains all of the values from the original array, ex…
Write a method named remove which should remove a given value from an array of i
Write a method named remove which should remove a given value from an array of integers. The method should return a new array which contains all of the values from the original ar…
Write a method named repeat that accepts an ArrayList of Strings and an integer
Write a method named repeat that accepts an ArrayList of Strings and an integer k as parameters and that replaces each element with k copies of that element. For example, if the l…
Write a method named replace that could be added to the HeapPriorityQueue class.
Write a method named replace that could be added to the HeapPriorityQueue class. This method accepts an element value value1and a replacement value value2, and finds and replaces …