Web development and programming
191828 questions • Page 3575 / 3837
class CharCounter implements StringProcessor { private int count; public void pr
class CharCounter implements StringProcessor { private int count; public void process(String s) { System.out.println("Counts: " + s.length()); } public int getCount(){ return coun…
class CharQueue { public: virtual bool isEmpty() const = 0; virtual void enqueue
class CharQueue { public: virtual bool isEmpty() const = 0; virtual void enqueue(const char newItem) = 0; virtual char dequeue(void) = 0; // dequeue an item and return its value v…
class Circle { private: //The radius of the circle double radius; //Color of the
class Circle { private: //The radius of the circle double radius; //Color of the circle string color; public: //Construct a default circle object Circle(); //Construct a circle ob…
class ClockType { public void setTime(int hour, int min, int sec); public int ge
class ClockType { public void setTime(int hour, int min, int sec); public int getTime(); public void printTime(); public void incrementSeconds(); private int hr; public int min; p…
class Complex { friend Complex addComplex (const Complex & c1, const Complex & c
class Complex { friend Complex addComplex (const Complex & c1, const Complex & c2); // add two complex numbers c1 and c2 // and return a complex one. friend Compl…
class Contact{ String fullName; String nickname; String DOB; Contact(){ fullName
class Contact{ String fullName; String nickname; String DOB; Contact(){ fullName = "No entry"; nickname = ""; DOB = ""; } Contact(String contactInfo){ String[] info = contactInfo.…
class Draganco { public static void main(String[ ] args){ System.out.println(\"P
class Draganco { public static void main(String[ ] args){ System.out.println("Please enter a ticket price"); int pi=TextIO.getInt(); TM atm=new TM(pi); int MeItem=…
class DriveExam { // an array of student\'s answers. private final String[] core
class DriveExam { // an array of student's answers. private final String[] corectAnswers = {"B","D","A","A","C","A","B","A","C","D","B","C","D","A","D","C","C","B","D","A"}; //Sto…
class Employee: def __init__(self, name, idNumber, department, jobTitle): self.n
class Employee: def __init__(self, name, idNumber, department, jobTitle): self.name = name self.idNumber = idNumber self.department = department …
class Employee: import java.util.Scanner; public class Employee { private String
class Employee: import java.util.Scanner; public class Employee { private String ssn; private String name; private String position; private int salary; public Employee(String ssn,…
class EmployeeTemplate private: class OnLeaveEmployee EmployeeTemplate f protect
class EmployeeTemplate private: class OnLeaveEmployee EmployeeTemplate f protected: int emp daysOnLeave: string emp reasonForLeave: bool emp_onLeave; int emp_id; protected: public…
class Employee{private: string firstName; string * lastName; int hourWorked; dou
class Employee{private: string firstName; string * lastName; int hourWorked; double PayRate; double Salary; public://1. write separate default and explicit constructors. The memor…
class EmptySea extends Ship You may wonder why \"EmptySea\" is a type of ship. T
class EmptySea extends Ship You may wonder why "EmptySea" is a type of ship. The answer is that the Ocean contains a Ship array, every location of which is, or can be, a reference…
class Farey { private: int Top, Bottom; public: Farey(); Farey(int T, int B); Fa
class Farey { private: int Top, Bottom; public: Farey(); Farey(int T, int B); Farey operator+(const Farey& RHS) const; Farey operator-(const Farey& RHS) const; bool operat…
class Farey { private: int Top, Bottom; public: Farey(); Farey(int T, int B); Fa
class Farey { private: int Top, Bottom; public: Farey(); Farey(int T, int B); Farey operator+(const Farey& RHS) const; Farey operator-(const Farey& RHS) const; bool operat…
class FastPath implements Lock { private static ThreadLocal myIndex; private Loc
class FastPath implements Lock { private static ThreadLocal myIndex; private Lock lock; private int x, y = 1; public void lock() { int i = myIndex.get(); x = i; // I’m here whi…
class Foo { class Bar { } } class Test { public static void main (String [] args
class Foo { class Bar{ } } class Test { public static void main (String [] args) { Foo f = new Foo(); /* Line 10: Missing statement ? */ } } which statement, inserted at line 10, …
class GasPump { private: int highOctane; // quantity of high octane gas in the p
class GasPump { private: int highOctane; // quantity of high octane gas in the pump int medOctane; // quantity of medium octane gas in the pump int lowOctane; // quantity of low o…
class GasPump { private: int highOctane; // quantity of high octane gas in the p
class GasPump { private: int highOctane; // quantity of high octane gas in the pump int medOctane; // quantity of medium octane gas in the pump int lowOctane; // quantity of low o…
class GradeBook: Define the GradeBook class. - def __init__(self): GradeBook con
class GradeBook: Define the GradeBook class. - def __init__(self): GradeBook constructor. Create the only instance variable, a list named grades, and initialize it to an empty lis…
class Hand {std::vector cords; public: Hand() = default; ~Hand() {} void add(con
class Hand {std::vector cords; public: Hand() = default; ~Hand() {} void add(const Card&); Card get(size_t index); virtual int score() const = 0; virtual void sort(); bool ope…
class Hand {std::vector cords; public: Hand() = default; ~Hand() {} void add(con
class Hand {std::vector cords; public: Hand() = default; ~Hand() {} void add(const Card&); Card get(size_t index); virtual int score() const = 0; virtual void sort(); bool ope…
class ImageData { private: //private member variables int rows; int cols; unsign
class ImageData { private: //private member variables int rows; int cols; unsigned char* pixelValues; unsigned char* pixelProcessed; …
class LL2{ public: /* Generally every class should have at least two construtors
class LL2{ public: /* Generally every class should have at least two construtors, a * default constructor and a copy constructor that creates a copy * of the given object…
class List { public: List(); List(int insize); ~List(); int get(int index) const
class List { public: List(); List(int insize); ~List(); int get(int index) const; void add(int value); int getSize() const; void remove(int index); private: int *listarray; int si…
class ListNode { private: int data; ListNode* prev; ListNode* next; public: List
class ListNode { private: int data; ListNode* prev; ListNode* next; public: ListNode() { prev = next = NULL; } ListNode(int d, ListNode* p, ListNode* n) { data = d;…
class ListNode { private: int data; ListNode* prev; ListNode* next; public: List
class ListNode { private: int data; ListNode* prev; ListNode* next; public: ListNode() { prev = next = NULL; } ListNode(int d, ListNode* p, ListNode* n) { data = d;…
class Main { public static void main(String[] args) { // TODO: First coding sess
class Main { public static void main(String[] args) { // TODO: First coding session // Create a short program that prompts the user for their name, // reads the name, …
class Main { public static void main(String[] args) { java.util.Scanner scan = n
class Main { public static void main(String[] args) { java.util.Scanner scan = new java.util.Scanner(System.in); System.out.println("Please type 'The quick brown fox.' in …
class Main { public static void main(String[] args) { java.util.Scanner scan = n
class Main { public static void main(String[] args) { java.util.Scanner scan = new java.util.Scanner(System.in); System.out.println("Please enter two booleans (true or fal…
class Member: def _-init-(self, self.name = name self.sponsor = sponsor self.ass
class Member: def _-init-(self, self.name = name self.sponsor = sponsor self.asset = asset self.mentor = mentor self , children = [] name, sponsor, asset, mentor None): = def gath…
class MutableString { private char[] chars = new char[200]; private int size = 0
class MutableString { private char[] chars = new char[200]; private int size = 0; public boolean set(char aChar, int index) { if (index < 0 || index >…
class MyListener implements ActionListener { public void actionPerformed(ActionE
class MyListener implements ActionListener { public void actionPerformed(ActionEvent event) { System.out.println(event); } } Timer t = new Timer(interval, listener); t.start(); Wh…
class NationalSite: def __init__(self, type, name, desc, url=None): self.type =
class NationalSite: def __init__(self, type, name, desc, url=None): self.type = type self.name = name self.description = desc self.url = url #each object will have a information o…
class Node { public: int data; Node * next; }; Node *p1, *p2, *p3; Assume also t
class Node { public: int data; Node * next; }; Node *p1, *p2, *p3; Assume also that the following statements have been executed: p1 = new(nothrow) Node; p2 = new(nothrow) Node; p3…
class Node: def __init__(self, value): self.value = value self.left = None self.
class Node: def __init__(self, value): self.value = value self.left = None self.right = None def mirrorTree(root): new_root = Node(root.value) assign_tree(root, new_root) retur…
class NodeList { public int item; public NodeList next; public NodeList( int val
class NodeList { public int item; public NodeList next; public NodeList(int val) { item = val; //initialize data } public NodeList(){ } public void printNode() { System. out.print…
class NodeList { public int item; public NodeList next; public NodeList(int val)
class NodeList { public int item; public NodeList next; public NodeList(int val) { item = val; //initialize data } public void Print() { System.out.print("{" + item + "}"); } }//e…
class NodeList { public int item; public NodeList next; public NodeList(int val)
class NodeList { public int item; public NodeList next; public NodeList(int val) { item = val; //initialize data } public void Print() { System.out.print("{" + item + "}"); } }//e…
class NodeList { public int item; public NodeList next; public NodeList(int val)
class NodeList { public int item; public NodeList next; public NodeList(int val) { item = val; //initialize data } public void Print() { System.out.print("{" + item + "}"); } }//e…
class Node{ int num; Node next; Node( int n ){ num = n; } }//end Node class clas
class Node{ int num; Node next; Node( int n ){ num = n; } }//end Node class class LList{ Node root = null; public LList join(LList L1, LList L2) { LList f = newLList(); Node r1=…
class Ocean Instance variables ships a collection of ships on the ocean shotsFir
class Ocean Instance variables ships a collection of ships on the ocean shotsFired - The total number of shots fired by the user. hitCount The number of times a shot hit a ship. I…
class Point2D { public: /* * Default Constructor * Places point at (0, 0) */ Poi
class Point2D { public: /* * Default Constructor * Places point at (0, 0) */ Point2D() { x = 0; y = 0; } /* * Constructor * Places point at (xCoord, yCoord) */ Point2D(int xCoord,…
class Point: def __init__ (self, x = 0, y = 0): self.__x = x self.__y = y def ge
class Point: def __init__ (self, x = 0, y = 0): self.__x = x self.__y = y def get_x(self): return self.__x def get_y(self): return self.__y def move(self,dx,dy): self.__x +=…
class Point: def__init__(seIf, init_x, init_y): sel f.x = init_x # self.x is an
class Point: def__init__(seIf, init_x, init_y): sel f.x = init_x # self.x is an instance variable self.y = init_y # self.y is an instance variable def__str__(self): return '({}, {…
class ProductDB { // Get the connection string from an external file public stat
class ProductDB { // Get the connection string from an external file public static string ConnectionString() { return File.ReadAllText(@"....DBConnStr.txt", Encoding.UTF8); } // G…
class Rational { public: Rational(int num, int den); Rational(int whole_number);
class Rational { public: Rational(int num, int den); Rational(int whole_number); Rational(); friend istream& operator>> (istream&, Rational &); friend ostream&am…
class Rectangle { public: void setLenthWidth (double x, double y); //Postconditi
class Rectangle { public: void setLenthWidth (double x, double y); //Postcondition: length = x; width = y; void print() const; //Output length and width; double area() const; //Ca…
class RentalCarBill main() // Declarations ________ customerName ________ numb
class RentalCarBill main() // Declarations ________ customerName ________ numberOfDays ________ carType ________ tax ________ billSubtotal ________ totalBill ________ RENTAL_RAT…
class Robot { public: int x,y; char heading; Robot(int start_x,int start_y, char
class Robot { public: int x,y; char heading; Robot(int start_x,int start_y, char start_heading) { x = start_x; y = start_y; heading = start_heading; } void setX(int i) { x = i; } …
Subject
Web development and programming
Use Browse or pick another subject.