Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Web development and programming

191828 questions • Page 3740 / 3837

public String halfAndHalf(String str) Given a String argument, return a new stri
public String halfAndHalf(String str) Given a String argument, return a new string that has the upper case version of the first half of the argument at the end and the lower case …
public String noXYZ(String s) returns a string in which all the letters x, y, an
public String noXYZ(String s) returns a string in which all the letters x, y, and z have been removed. You must use a loop. Example : input : "I zwant ya xcat" output : "I want a …
public T remove () Comparable rVal arr[0] arr [0] = arr [next-); reHeapDown (0);
public T remove () Comparable rVal arr[0] arr [0] = arr [next-); reHeapDown (0); return (T)rVal; Complete the code for reHeapDown(int index) that was discussed in class and in the…
public T removeMethod(int id) { // remove and return element at position index /
public T removeMethod(int id) { // remove and return element at position index // shift elements to remove any gap in the list // throw IndexOutOfBoundsException for invalid index…
public Temp() : The default constructor for the class, which initializes the obj
public Temp(): The default constructor for the class, which initializes the object to 32 degree Fahrenheit. Both variables must be set using explicit assignment statements. You ca…
public Temp() : The default constructor for the class, which initializes the obj
public Temp(): The default constructor for the class, which initializes the object to 32 degree Fahrenheit. Both variables must be set using explicit assignment statements. You ca…
public TreeNode removeA(int x) { if (this == externalnode ) return externalnode;
public TreeNode removeA(int x) { if (this == externalnode ) return externalnode; // Item not found; do nothing if (x < this.getData()) {                this.setLeft(this.getLef…
public abstract class Cake ., private String cakeMix: public Cake (String cakeMi
public abstract class Cake ., private String cakeMix: public Cake (String cakeMix) f this.cakeMix - cakeMix; public String makeCake) i String cake ""; cake += blend(); cake += pou…
public abstract class Card implements Comparable{ /* handy arrays for rank
public abstract class Card implements Comparable<Card>{ /* handy arrays for ranks and suits */ public final static String[] RANKS = { "None", "Joker", "2", "3", "4", "5", "6…
public abstract class House private int size public static int numPeople1; publi
public abstract class House private int size public static int numPeople1; public void temperaturelint cost) public House( Public House(int size} { publia int getsise ( public cla…
public abstract class Shape // attributes private String color; private boolean
public abstract class Shape // attributes private String color; private boolean filled; : @param color * @param filled public Shape(String color, boolean filled) ( super(); this.c…
public abstract class Vehicle { private String description;// make-model for car
public abstract class Vehicle {     private String description;// make-model for cars/suvs, length for trucks     private int mpg;// miles per gallon     private String num_value;…
public boolean contains(Object o) { // Implement it in this exercise Node curren
public boolean contains(Object o) { // Implement it in this exercise Node current = head; for (int i = 0; i < size; i++) { if (current.element.equals(o)) return true; current =…
public boolean equals(Student otherStudent) { return this.hasSameName(otherStude
public boolean equals(Student otherStudent)     {         return this.hasSameName(otherStudent) &&               (this.studentNumber == otherStudent.studentNumber);     } …
public boolean findTheExit() { return findTheExit(getStartRow(), getStartColumn(
public boolean findTheExit() {         return findTheExit(getStartRow(), getStartColumn()); } /** * This recursive backtracking method exhaustively searches the maze for an * exit…
public boolean findTheExit() { return findTheExit(getStartRow(), getStartColumn(
public boolean findTheExit() {         return findTheExit(getStartRow(), getStartColumn()); } /** * This recursive backtracking method exhaustively searches the maze for an * exit…
public char[] replaced(char[] array, char oldChar, char newChar) Return a new ch
public char[] replaced(char[] array, char oldChar, char newChar) Return a new char[] that is a copy of array with all occurrences of oldChar replaced by newChar -- so replaced ({'…
public class AVLTree { /* Implements a ALV tree of ints stored in a random acces
public class AVLTree { /* Implements a ALV tree of ints stored in a random access file. Duplicates are recorded by a count field associated with the int */ public static final int…
public class Account { // data fields private int ACCNumber; private double ACCB
public class Account { // data fields private int ACCNumber; private double ACCBalance; private String CustomerID; private String DebitNo; private String BName; private String BID…
public class Accumulator { private double total: private int N: } public class T
public class Accumulator { private double total: private int N: } public class Transaction { private final String who: private final Date when: private final double amount: } publ…
public class Accumulator { private double total: private int N: } public class T
public class Accumulator { private double total: private int N: } public class Transaction { private final String who: private final Date when: private final double amount: } publ…
public class Admission { public static void main(String[]args){ String strAmount
public class Admission { public static void main(String[]args){ String strAmount1; String strAmount2; double amt1; double amt2; strAmount1= JOptionPane.showInputDialog(null, "Ente…
public class Alien { private static int alienCount; private static int rogueCoun
public class Alien { private static int alienCount; private static int rogueCount; private String name;        // original name private String homePlanet; // the home planet priva…
public class AnApplication { public static void main(String[] args) { AModel mod
public class AnApplication { public static void main(String[] args) { AModel model = new AModel(); AView view = new AView(); AController controller = new AController(model, view);…
public class Animal { double weight; int height; Animal(int height, double weigh
public class Animal {    double weight;    int height;    Animal(int height, double weight){        this.height = height;        this.weight = weight;    }    public double getWei…
public class Answer { private String answer; private int points; public Answer()
public class Answer { private String answer; private int points; public Answer() { } public Answer(String answer, int points) { this.answer = answer; this.points = points; } publi…
public class Array public static void main() // Declarations num dep num count[5
public class Array             public static void main()                         //          Declarations                                     num dep num count[5] = 0, 0, 0, 0, 0 …
public class ArrayExpQuickQuiz { public static void main(String[] args) { // ple
public class ArrayExpQuickQuiz {         public static void main(String[] args) { // please Enter your code here to complete the application, it has to be written here, I want it …
public class ArrayManipulation { public static void main(String[] args ) { Integ
public class ArrayManipulation {   public static void main(String[] args) { Integer[] a = { 1, 2, 3, 4, 5, 6, 7 }; Character[] b = { 'a', 'b', 'c', 'd', 'e', 'f', 'g' }; Double[] …
public class ArrayMultiSet extends AbstractCollection { /** Array in which
public class ArrayMultiSet<E> extends AbstractCollection<E> { /** Array in which the elements in this multiset are stored. */ private E[] _store; /** Array indices bel…
public class ArrayQuickCode { // create and output two-dimensional arrays public
public class ArrayQuickCode {    // create and output two-dimensional arrays    public static void main( String[] args )    {       int[][] array1 = { { 1, 2, 3 }, { 6, 5 }, { 8 }…
public class ArraySet{ // A simple implementation of a
public class ArraySet<T extends Comparable<T>>{ // A simple implementation of a Set backed by an array. As a Set, // instances track *unique* items so that no duplicat…
public class Asgn02_ComboLock { public static Scanner cin = new Scanner(System.i
public class Asgn02_ComboLock { public static Scanner cin = new Scanner(System.in); private static int cmdCount = 0; public static void main(String[] args) { int secret1, secret2,…
public class Assignment7 { public static void main(String[] args) { int number,
public class Assignment7 { public static void main(String[] args) { int number, size; String choice; char command; Scanner keyboard = new Scanner(System.in); // ask a user for a a…
public class Automaton implements Iterable { private static final int SIZE = 20;
public class Automaton implements Iterable { private static final int SIZE = 20; // TODO Declare the data members. // TODO Implement the constructor. private void createCells() { …
public class Average { public static void main(String[] args) { int n = 1.0; Sca
public class Average { public static void main(String[] args) { int n = 1.0; Scanner scanner = new Scanner(system.in); System.out.println("This program calculates " + "the average…
public class BST
public class BST<T extends Comparable<? super T>> { // DO NOT ADD OR MODIFY INSTANCE VARIABLES. private BSTNode<T> root; private int size; /** * Finds and retrie…
public class BadNews { public static final int MAX_ODD = 21; public static void
public class BadNews { public static final int MAX_ODD = 21; public static void writeOdds() { // print each odd number for (int count = 1; count <= (MAX_ODD - 2); count++) { Sy…
public class Bal1 private double rx, ry: public Ball) { rx = 0.5; ry= 0.5; } 6 p
public class Bal1 private double rx, ry: public Ball) { rx = 0.5; ry= 0.5; } 6 public void move () 9 10 rx = rx + .001; ry = ry + .002; public void move (double vx, double vy) 12 …
public class Bank Account private double balance public Bank Account balance 0;
public class Bank Account private double balance public Bank Account balance 0; public BankAccount double acctBalance) balance acctBalance; public void deposit (double amount) bal…
public class Bank Account private double balance public Bank Account balance 0;
public class Bank Account private double balance public Bank Account balance 0; public BankAccount double acctBalance) balance acctBalance; public void deposit (double amount) bal…
public class Bank { private Account[] accounts = new Account[100]; private int s
public class Bank { private Account[] accounts = new Account[100]; private int size; private int capacity;    private static final int SAVINGS = 0; private static final int CHECKI…
public class BankAccount { private double balance; public BankAccount() { balanc
public class BankAccount {    private double balance;    public BankAccount()    {       balance = 0;    }    public BankAccount(double initialBalance)    {       balance = initia…
public class BankAccount { public double balance; public BankAccount () { balanc
public class BankAccount { public double balance; public BankAccount () { balance - 0.0;} public void withdraw (double amount) { balance - amount; } public void deposit (double am…
public class BaseClass { // methods of BaseClass } public SomeClass extends Base
public class BaseClass { // methods of BaseClass } public SomeClass  extends BaseClass             { // methods of SomeClass } a.       SomeClass scobj = new SomeClass( ); b.     …
public class BaseClass { // methods of BaseClass } public SomeClass extends Base
public class BaseClass { // methods of BaseClass } public SomeClass extends BaseClass { // methods of SomeClass } a. SomeClass scobj = new SomeClass( ); b. BaseClass bcobj = scobj…
public class BasketballTeam { private int score; private String name; public Bas
public class BasketballTeam { private int score; private String name; public BasketballTeam(String s) { score = 0; name = s; } public int getScore( ) { return score; } public Stri…
public class Beatles { public static void main (String[] args) { ArrayList band
public class Beatles { public static void main (String[] args) { ArrayList band = new ArrayList(); band.add("John"); band.add ("Paul"); band.add ("Pete"); band.add ("John"); band.…
public class BinaryHeap { private int data; private BinaryHeap left; private Bin
public class BinaryHeap {    private int data;    private BinaryHeap left;    private BinaryHeap right;           public BinaryHeap(int x) {        data = x;        left = null;  …
public class BinarySearchTree { protected int data; protected BinarySearchTree n
public class BinarySearchTree { protected int data; protected BinarySearchTree node; protected BinarySearchTree left; protected BinarySearchTree right; protected BinarySearchTree …