Browse C
Alphabetical listing with fast deep pagination.
81169 items • Page 1573 / 1624
class AptComplex1implements ActionListener { JTextArea innerText1; public AptCom
class AptComplex1implements ActionListener { JTextArea innerText1; public AptComplex1RadioButtonHandler(JTextArea innerTextArea) { …
class Array { public static int getTotal(int[][]numbers ) { int tot=0; // Lo0op
class Array { public static int getTotal(int[][]numbers ) { int tot=0; // Lo0op repeats until list ends for (int row = 0;row < numbers .legth; row++) for (int col=0 ;col< nu…
class ArrayList{ Object[] list; int size; // Constructor public ArrayList(int n)
class ArrayList{ Object[] list; int size; // Constructor public ArrayList(int n){ list = new Object[n]; size = 0; } // Add at the end of the Array…
class B : public A { ... // public members of A are public members of 3 // prote
class B : public A { ... // public members of A are public members of 3 // protected members of A are protected members of 3 class C : protected A { ... // public and protected me…
class B { private String name; public B(String s) { name = s; } public void fina
class B { private String name; public B(String s) { name = s; } public void finalize() { System.out.print(name); } } 10 class E { public static void m() { B x1 = new B("X"), y1 = …
class Bar { } class Test { Bar doBar() { Bar b = new Bar(); /* Line 6 */ return
class Bar { } class Test { Bar doBar() { Bar b = new Bar(); /* Line 6 */ return b; /* Line 7 */ } public static void main (String args[]) { Test t = new Test(); /* Line 11 */ Bar …
class Blob: Represents a blob. def init (self) Constructs an empty blob self num
class Blob: Represents a blob. def init (self) Constructs an empty blob self number of pixels self. x x-coordinate of center of mass self. y y-coordinate of center of mass def add…
class Boo { Boo(String s) { } Boo() { } } class Bar extends Boo { Bar() { } Bar(
class Boo { Boo(String s) { } Boo() { } } class Bar extends Boo { Bar() { } Bar(String s) {super(s);} void zoo() { // insert code here } } which one create an anonymous inner clas…
class Book(object): \"\"\"A Book Object.\"\"\" def __init__(self, title, author,
class Book(object): """A Book Object.""" def __init__(self, title, author, pub_yr='Unknown'): self.title = title self.author = author self.pub_yr = pub_yr def __repr__(self): retu…
class Box { private: double lenght, width, height; public: Box(double l = 0.0, d
class Box { private: double lenght, width, height; public: Box(double l = 0.0, double w = 0.0, double h = 0.0) { lenght = l; width = w; height = h; } double GetLength() { return l…
class Car { final int speedlimit = 180; public void Start() { System.out.println
class Car { final int speedlimit = 180; public void Start() { System.out.println("Car is started.."); } } class Van extends Car { int speedlimit = 130; @Override public void Start…
class Card (object): cardtype = \'Staff\' class Player(object): def __init__(sel
class Card(object): cardtype = 'Staff' class Player(object): def __init__(self, deck, name): """Initialize a Player object. A Player starts the game by drawing 5 cards from their …
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 double radius; // Radius of this circle f nal double PI =
class Circle { private double radius; // Radius of this circle f nal double PI = 3.14159; public void setRadius(double rad) { radius = rad; } public double getRadius() { return ra…
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 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 GERONTOLOGICAL NURSING Journal Article Summary Assignment: The purpose of
class GERONTOLOGICAL NURSING Journal Article Summary Assignment: The purpose of the journal article summary assignment is for students to improve their knowledge of evidence-based…
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 Money { public: Money(int dollars = 0, int cents = 0); Money operator+(con
class Money { public: Money(int dollars = 0, int cents = 0); Money operator+(const Money&) const; Money operator-(const Money&) const; Money& operator*(double); Money&…
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…