Browse P
Alphabetical listing with fast deep pagination.
81033 items • Page 1608 / 1621
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 Animal { private String type; private String sound; public void set
public class Animal { private String type; private String sound; public void set_type( String newtype) { type=newtype; type="cow"; } public String get_type() { return type; } publ…
public class Animal { private String type; private String sound; public void set
public class Animal { private String type; private String sound; public void set_type( String newtype) { type=newtype; type="cow"; } public String get_type() { return type; } publ…
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 ArrayIndex { public static void main(String[] args) { final int Arr
public class ArrayIndex { public static void main(String[] args) { final int Array_Length = 6; int[] array = new int[Array_Length]; for(int counter = 0; counter < array.leng…
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 BinaryNode { // create an empty node public BinaryNode() { this(
public class BinaryNode<T> { // create an empty node public BinaryNode() { this(null, null, null); } // create a node with given value and children public BinaryNode(T theEl…
public class BinarySearchTree { BinaryNode root; public void insert(int k){ if (
public class BinarySearchTree { BinaryNode root; public void insert(int k){ if (root==null) root = new BinaryNode(k); …
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 …
public class BinarySearchTreeND < K extends Comparable < ? super K > > { static
public class BinarySearchTreeND < K extends Comparable < ? super K > > { static final int DEPTHDELTA = 5; // used to create a text tree display BSTNodeND < K > r…
public class BingoMac { public static int drawNum(){ Random rand = new Random();
public class BingoMac { public static int drawNum(){ Random rand = new Random(); int num = rand.nextInt(75-1+1)+1; return num; } publ…
public class BingoMac { public static int drawNum(){ Random rand = new Random();
public class BingoMac { public static int drawNum(){ Random rand = new Random(); int num = rand.nextInt(75)+1; return num; } public s…
public class Book { private String title; private String ISBN; private double co
public class Book { private String title; private String ISBN; private double cost; private int yearPublished; private Author writer; //Q1 Which field above is a…
public class BookTeater public static void main (string 1 args) Book bl new Book
public class BookTeater public static void main (string 1 args) Book bl new Book ("Java programming a & Loftus Pearson 2014) System-out-print in (b1 +"In"): Book b2 new Book (…
public class BoundedQueue2 { // Overview: a BoundedQueue2 is a mutable, bounded
public class BoundedQueue2 { // Overview: a BoundedQueue2 is a mutable, bounded FIFO data structure // of fixed size , with size being fixed at 2. // A typical Queue is […
public class BoundedQueue2 { // Overview: a BoundedQueue2 is a mutable, bounded
public class BoundedQueue2 { // Overview: a BoundedQueue2 is a mutable, bounded FIFO data structure // of fixed size , with size being fixed at 2. // A typical Queue is […