Browse P
Alphabetical listing with fast deep pagination.
81033 items • Page 1612 / 1621
public class MyLinkedList implements Iterable { private int t
public class MyLinkedList <AnyType> implements Iterable<AnyType> { private int theSize; private Node<AnyType> beginMarker; private Node<AnyType> e…
public class MyMethods { public static void hello( ) { System.out.println(\"hell
public class MyMethods { public static void hello( ) { System.out.println("hello 1"); System.out.println("hello 2"); System.out.println("hello 3"); System.out.println("hello 4"); …
public class MyNode{ private double data; private MyNode next; private MyNode pr
public class MyNode{ private double data; private MyNode next; private MyNode prev; publicMyNode(double d, MyNode p, DoublyLinkedStringNoden) { data = …
public class MyStack { // Declare member variables here /** * Construct
public class MyStack<AnyType> { // Declare member variables here /** * Construct an empty Stack. */ public MyStack( ){ // TODO: Implement Default Constructor } /** * Empties…
public class MyStack extends SingleLinkedList implements StackInterface
public class MyStack<E> extends SingleLinkedList<E> implements StackInterface<E>{ ... insert code...}. Implement the MyStack to the interface 'StackInterface'. U…
public class MyTree{ private TreeNode root; public MyTree(){ root=null; } public
public class MyTree{ private TreeNode root; public MyTree(){ root=null; } public void remove(int data){ if (root == null) return false; else{ if (root.getValue() == value) { BS…
public class Node { private String data; private Node next; public Node(String d
public class Node { private String data; private Node next; public Node(String d, Node n ) { data = d; next = n; } // The usual get/set methods, plus …
public class Node { private String data; private Node next; public Node(String d
public class Node { private String data; private Node next; public Node(String d, Node n ) { data = d; next = n; } // The usual get/set methods, plus …
public class Node1 { //sum class public int sum(Node1 n) { if(n.next==null) retu
public class Node1 { //sum class public int sum(Node1 n) { if(n.next==null) return n.data; else return n.data+sum(n.next); } b) IN CLASS LINKEDL…
public class Node { private T data; private Node lef
public class Node<T extends Comparable<T>> { private T data; private Node<T> left; private Node<T> right; public Node(){ data = null; left = null;…
public class NonZeroNumQueue{ private int[] data; private int total; private int
public class NonZeroNumQueue{ private int[] data; private int total; private int front; private int tail; public NonZeroNumQueue(){ data=new int[10]; total=0; front=tail=0; } publ…
public class NonZeroNumQueue{ private int[] data; private int total; private int
public class NonZeroNumQueue{ private int[] data; private int total; private int front; private int tail; public NonZeroNumQueue(){ data=new int[10]; total=0; front=tail=0; } publ…
public class NumberCollection { private int[] numberArray; private int count; pu
public class NumberCollection { private int[] numberArray; private int count; public NumberCollection(int arraySize) { numberArray = new int[arraySize]; count = 0; } private int i…
public class ObjectArray {private final int INITIAL_ARRAY_SIZE = 10;private fina
public class ObjectArray {private final int INITIAL_ARRAY_SIZE = 10;private final int ARRAY_EXPAND = 20;private Object[] myObjects = new Object[INITIAL_ARRAY_SIZE];private int cur…
public class One { public void methodOne(int i) { } public void methodTwo(int i)
public class One { public void methodOne(int i) { } public void methodTwo(int i){ } public static void methodThree(int i){ } public static void methodFour(int i){ } } public class…
public class OneThing { public One Thing () (): public void foo1 () { System.out
public class OneThing { public One Thing () (): public void foo1 () { System.out.print ("Hi There*"): } public void foo2 () { System. out print ("Bye Now*") foo1 (): } public clas…
public class PQT { public static void main(String[] args) { //declare variables
public class PQT { public static void main(String[] args) { //declare variables doubleprice, total; int quantity; String priceString = "49.99"; String quantity…
public class PQueuecE extends Comparable > { private E [] elements: private int
public class PQueuecE extends Comparable > { private E [] elements: private int size: private int head: private int tail: private int count;/constructor implemaentation not pri…
public class ParameterPassing public static void swap (int a, int b) t int tempa
public class ParameterPassing public static void swap (int a, int b) t int tempai a -b b temp public static void main (string[ args) int x 33 int y = 44; System.out.println (x "y)…
public class Patient extends Person { //=========== Properties =============== p
public class Patient extends Person { //=========== Properties =============== private int pId; private String address; //=========== Constructors ============= public Patient(){ …
public class PeopleWeights { public static void main(String args[]) { Scanner sc
public class PeopleWeights { public static void main(String args[]) { Scanner sc=new Scanner(System.in); double m[]=new double[5]; double weight = 0, avg, max = 0; int i; for (i =…
public class Person { // person name protected String name; // defualt construct
public class Person { // person name protected String name; // defualt constructor public Person() { name ="No Name Yet"; } // 1st argument constructors public Person(String initi…
public class Person { private String Name; // The Persons Name private int phone
public class Person { private String Name; // The Persons Name private int phoneNumber; // The Persons Phone Number private String address; // The Persons Address public Person() …
public class Person { private String firstName; private String lastName; public
public class Person { private String firstName; private String lastName; public Person() { firstName = " "; lastName = " "; } public Person(String first, String last) { setName(fi…
public class Person { private String name; private int age; public Person() { na
public class Person { private String name; private int age; public Person() { name=""; age=0; } /** Create a person with a given name and age. @param name the name @param age the …
public class Person{ //========== Properties ============= private int password;
public class Person{ //========== Properties ============= private int password; private String firstName; private String lastName; private String email; //========= Constructor =…
public class Pet { String Name; String Type; int Age; int Height; int Weight; in
public class Pet { String Name; String Type; int Age; int Height; int Weight; int Legs; public String getName() { return Name; } public void setName(String name) { Name = name; } …
public class PigLatinTranslatorMain i @param args the command line arguments pub
public class PigLatinTranslatorMain i @param args the command line arguments public static void main (String[] args) i 7 TODO code application logic here PígLatinTranslator pigLat…
public class Pizza { private String size; private int numCheeseToppings; private
public class Pizza { private String size; private int numCheeseToppings; private int numHamToppings; private int numPepperoniToppings; public Pizza() { size = "Large"; numCheeseTo…
public class Planner The Planner class implements an abstract data type for a li
public class Planner The Planner class implements an abstract data type for a list of courses supporting some common operations public Planner Constructs an instance of the Planne…
public class Player private int X; priva private int position [: private int Hea
public class Player private int X; priva private int position [: private int Health; private Weapon currentWeapon; te int Y; public Player)I position -new int [2] position [O] 0; …
public class Point private int x; private int y public void setx(int x) this.xX
public class Point private int x; private int y public void setx(int x) this.xX public void set(int y) this.y-y public void setxY(int x, int y) x-yi public boolean IsEqual(Point p…
public class Point private int x; private int y; public void setx(int x) this.xX
public class Point private int x; private int y; public void setx(int x) this.xX public void set(int y) this.y-y; public void setXY(int x, int y) X-y: public boolean IsEqual(Point…
public class Point t private int x; private int y; public void setx(int x) this.
public class Point t private int x; private int y; public void setx(int x) this.x.x public void sety(int y) this.yey public void setXY(int x, int y) x-yi Yay: public boolean IsEqu…
public class Point { private double x, y; public Point() { this.x = 0; this.y =
public class Point { private double x, y; public Point() { this.x = 0; this.y = 0; } public Point(double x, double y) { this.x = x; this.y = y; } /** * @return the x */ public dou…
public class Point{ private int x; private int y; public Point(int x,int y){ thi
public class Point{ private int x; private int y; public Point(int x,int y){ this.x=x; this.y=y; } } 1. write a java statement to instantiate a point object, called p, using any v…
public class Polymorphism int 1: private protected double 22: //private protecte
public class Polymorphism int 1: private protected double 22: //private protected. Polymorphism z1. 2; z2 4: public void addition (int x, int y) z1. System out println ("The S f a…
public class PolymorphismTest 7 public static void main( String[] args assign su
public class PolymorphismTest 7 public static void main( String[] args assign superclass reference to superclass variable Commission Employee commissionEmployee new CommissionEmpl…
public class Position {/*+ row and col are both > = 0 except in the default * co
public class Position {/*+ row and col are both > = 0 except in the default * constructor where they are initialized to -1. */private int row, col; public Position() {row = -1;…
public class PremiumAccount extends JavaAccount { public static double minimumBa
public class PremiumAccount extends JavaAccount { public static double minimumBalanceRequired = 20; public static double checkFee = 2; private static String PIN = "XXXYYYZZZ"; pri…
public class PrintBinary { public static void main(String[] args) { // TODO code
public class PrintBinary { public static void main(String[] args) { // TODO code application logic here Scanner s = new Scanner(System.in); int x = s.nextInt(); char choice; Sy…
public class Problem5{ // Program to display number of correct and incorrect ans
public class Problem5{ // Program to display number of correct and incorrect answers public static void main(String []args){ char[] answerKeyFromChars = { 'D', 'B', 'D', 'C', '…
public class Procedure { //============ Properties ============= private int pro
public class Procedure { //============ Properties ============= private int procCode; private String procName; private String procDesc; private float cost; //============ Constru…
public class Procedure { //============ Properties ============= private int pro
public class Procedure { //============ Properties ============= private int procCode; private String procName; private String procDesc; private float cost; //============ Constru…
public class ProcessCardNumbers { /** * Write a main method to process a text fi
public class ProcessCardNumbers { /** * Write a main method to process a text file of credit cards (cardNumbers.txt). * The method should read each card number from the file, prin…
public class ProgrammingProject4 { public static void main(String[] args) { //cr
public class ProgrammingProject4 { public static void main(String[] args) { //create array //Initialize array //d…
public class Queens { // squares per row or column public static final int BOARD
public class Queens { // squares per row or column public static final int BOARD_SIZE = 8; // used to indicate an empty square public static final int EMPTY = 0; // used…
public class Question { private String text; private String answer; public Quest
public class Question { private String text; private String answer; public Question() { text=""; answer=""; } public void setText(String ques…
public class Question_5_Average_Utility_Bill { String[] months = { \"January\",
public class Question_5_Average_Utility_Bill { String[] months = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "D…
public class QueueReferenceBased implements QueueInterface { private Node lastNo
public class QueueReferenceBased implements QueueInterface { private Node lastNode; public QueueReferenceBased() { lastNode = null; } // end default constructor // queue operation…