CJCoding With Joseph
15free / daySign inCreate account
TitleOpen
94
Create a Person ClassCreate a class named Person with one private member: String name.
easyNot startedSolve
95
Create a Cat ClassCreate a class named Cat with one private member: String sound.
easyNot startedSolve
96
Create a Car ClassCreate a class named Car with one private member: String brand.
easyNot startedSolve
97
Create a Lamp ClassCreate a class named Lamp with one private member: boolean isOn.
easyNot startedSolve
98
Create a Counter ClassCreate a class named Counter with one private member: int count.
easyNot startedSolve
99
Create a City ClassCreate a class named City with one private member: String name.
easyNot startedSolve
100
Set and Get a Dog NameCreate a class named Dog with one private member: String name.
easyNot startedSolve
101
Set and Get an AgeCreate a class named Student with one private member: int age.
easyNot startedSolve
102
Set and Get a Book TitleCreate a class named Book with one private member: String title.
easyNot startedSolve
103
Set and Get a Light StateCreate a class named Light with one private member: boolean on.
easyNot startedSolve
104
Set and Get a ScoreCreate a class named Game with one private member: int score.
easyNot startedSolve
105
Person With Name ConstructorCreate a class named Person2 with one private member: String name.
easyNot startedSolve
106
Rectangle With Width and HeightYou are building a Rectangle class.
easyNot startedSolve
107
Account With BalanceCreate a class named Account with one private member: double balance.
easyNot startedSolve
108
Movie With Title and RatingCreate a class named Movie with two private members: String title and int rating.
easyNot startedSolve
109
Point With X and YCreate a class named Point with two private members: int x and int y.
easyNot startedSolve
110
Set and Get a UsernameCreate a class named User with one private member: String username.
easyNot startedSolve
111
Set and Get a TemperatureCreate a class named Thermometer with one private member: double temperature.
easyNot startedSolve
112
Set and Get a Favorite ColorCreate a class named Profile with one private member: String favoriteColor.
easyNot startedSolve
113
Set and Get a SpeedCreate a class named Vehicle with one private member: int speed.
easyNot startedSolve
114
Set and Get a BalanceCreate a class named Wallet with one private member: double balance.
easyNot startedSolve
115
Triple Constructor - Book InfoCreate a class named BookInfo with three private members: String title, String author, int year.
easyNot startedSolve
116
Triple Constructor - Point3DCreate a class named Point3D with three private members: int x, int y, int z.
easyNot startedSolve
117
Triple Constructor - CourseCreate a class named Course with three private members: String name, String code, int credits.
easyNot startedSolve
118
Triple Constructor - EmployeeCreate a class named Employee with three private members: String name, String role, double salary.
easyNot startedSolve
119
Triple Constructor - RecipeCreate a class named Recipe with three private members: String name, int servings, String difficulty.
easyNot startedSolve
120
SeniorPass SubclassConsider the TransitPass and StudentPass classes shown below.
easyNot startedSolve
121
Seekable InterfaceDefine an interface called Seekable so that both Podcast and LiveStream can implement it.
easyNot startedSolve
122
Abstract Subscription ClassWrite an abstract class called Subscription with the following requirements: - protected String type - protected double basePrice - protected boolean multipleUsersAllowed Methods: 1.
easyNot startedSolve
123
OnlineSubscription calcMonthlyCostUpdate this class called OnlineSubscription that extends Subscription.
easyNot startedSolve
126
Podcast Implements SeekableCreate a class Podcast that implements the Seekable interface.
easyNot startedSolve
127
LibraryCard GettersCreate a class named LibraryCard with two private fields: String owner and int cardNumber.
easyNot startedSolve
128
LibraryCard toStringCreate a class named LibraryCard with private fields owner and cardNumber.
easyNot startedSolve
129
StudentPass OverrideCreate a class StudentPass that extends TransitPass.
easyNot startedSolve
130
InvalidAgeException ClassCreate a checked exception class InvalidAgeException that extends Exception.
easyNot startedSolve
131
Rectangle AreaCreate a class Rectangle with private int width and height.
easyNot startedSolve
133
Point2D CloneCreate a class Point2D with int x and y.
easyNot startedSolve
134
Display Fare HelperCreate a class FareHelper with a static method displayFare(TransitPass pass, int trips).
easyNot startedSolve
170
Create a Simple Generic Box ClassCreate a generic class named Box<T> that stores one item.
easyNot startedSolve
171
Add a Setter to a Generic BoxComplete the setItem method so the generic Box<T> object can update its stored value after it is created.
easyNot startedSolve
173
Build a Generic Pair ClassComplete the Pair<T> class.
easyNot startedSolve
174
Create a Key Value Pair ClassComplete the KeyValuePair<K, V> class.
easyNot startedSolve
181
Make a Generic Wrapper ClassComplete the Wrapper<T> class.
easyNot startedSolve
191
Extend a Dog from AnimalA base class Animal is provided with a name field and a speak() method that returns "...".
easyNot startedSolve
192
Override toString in StudentA Person class is provided with a name field.
easyNot startedSolve
193
Implement a Greetable InterfaceAn interface Greetable is provided with one method: String greet().
easyNot startedSolve
194
Abstract Shape with CircleAn abstract class Shape is provided with an abstract method double area().
easyNot startedSolve
195
Inherit and Call Super MethodA Vehicle class is provided with a method describe() that returns "I am a vehicle".
easyNot startedSolve
492
Describe a Two-Type Pair With toStringThe generic class Pair<A, B> holds two values that may be of different types, so it declares two type parameters.
easyNot startedSolve
496
Give a Generic Maybe a Fallback ValueMaybe<T> wraps one value of any type that may be missing.
easyNot startedSolve
497
Store Items on a Generic ShelfShelf<T> keeps its items in a private ArrayList<T>, so one shelf class can hold books, scores or anything else.
easyNot startedSolve
500
Use a Number Bound on a Generic ClassNumberBox<T extends Number> only accepts numeric types such as Integer, Double and Long.
easyNot startedSolve
501
Implement a Generic Interface for One TypeThe generic interface Formatter<T> turns a value of type T into text.
easyNot startedSolve
507
Use an Inherited Getter in a SubclassGuitar extends Instrument, so every guitar already has the public method getName() without writing it again.
easyNot startedSolve
508
Pass Two Values Up With superLaptop extends Device.
easyNot startedSolve
509
Add to the Parent's Price With super.getPrice()VipTicket extends Ticket and overrides getPrice().
easyNot startedSolve
510
Change a Protected Field From a SubclassProduct declares its stock field as protected, so code inside a subclass can read and change it directly, while unrelated classes cannot.
easyNot startedSolve
511
Let a Parent-Type Parameter Pick the Right OverrideParrot and Owl both extend Bird and override sound().
easyNot startedSolve
512
Count Subclass Objects With instanceofA Player[] array can hold plain Player objects and Goalie objects, because a Goalie is a Player.
easyNot startedSolve
513
Downcast to Reach a Subclass MethodpointsOf receives an Account, but only a PremiumAccount has getRewardPoints().
easyNot startedSolve
514
Build on the Parent's toStringCourse already has a toString() that returns text such as Course MATH101.
easyNot startedSolve
515
Total the Pay of a Mixed Staff ArrayIntern and Contractor both extend Worker and override weeklyPay().
easyNot startedSolve
516
Overload an Inherited Method in a SubclassOverloading means two methods share a name but take different parameters.
easyNot startedSolve
522
Implement an Interface With Two MethodsThe interface Measurable lists two methods and gives neither a body.
easyNot startedSolve
523
Use an Interface as a Parameter TypePerformer is an interface with one method, perform().
easyNot startedSolve
524
Implement Two Interfaces in One ClassA class can extend only one class, but it can implement any number of interfaces: list them after implements with commas between.
easyNot startedSolve
525
Write a Default Method in an InterfaceIn this question the public type of the file is the interface Greeter itself.
easyNot startedSolve
526
Override a Default Method in One ClassAlarm gives ring() a default body that returns Beep.
easyNot startedSolve
527
Read a Constant From an InterfaceA field declared in an interface is a constant: it is public static final even though none of those words are written.
easyNot startedSolve
528
Call a Static Method on an InterfaceSince Java 8 an interface may hold a static method with a body.
easyNot startedSolve
529
Make a Class Comparable by One FieldComparable<Movie> is an interface from the Java library with a single method, compareTo.
easyNot startedSolve
530
Count Ready Items Through an Interface ArrayCheckable is an interface with one method, isReady().
easyNot startedSolve
531
Implement an Interface That Extends AnotherAn interface can extend another interface.
easyNot startedSolve
537
Call an Abstract Parent's ConstructorTool is an abstract class, so new Tool(...) is not allowed, but it still has constructors, and one of them runs every time a subclass object is built.
easyNot startedSolve
538
Implement Two Abstract MethodsTransport is an abstract class with two abstract methods and one finished method, describe(), that calls both of them.
easyNot startedSolve
539
Use an Inherited Getter Inside an Abstract MethodMembership is an abstract class that stores the number of months in a private field and leaves cost() abstract.
easyNot startedSolve
540
Compute a Commission From a Protected FieldSeller is an abstract class with two protected fields and an abstract method commission().
easyNot startedSolve
541
Finish the Concrete Method of an Abstract ClassReport is an abstract class: every kind of report supplies its own body(), and the finished method render() wraps that body in a heading.
easyNot startedSolve
542
Turn a Placeholder Into an Abstract MethodSensor is an abstract class, but its read() method is still an ordinary method with a made-up body that returns 0.0.
easyNot startedSolve
543
Fill In Two Subclasses of an Abstract PiecePiece is an abstract class with two abstract methods, and its finished describe() method uses both.
easyNot startedSolve
544
Finish the Bottom of a Two-Level Abstract ChainAbstract classes can be stacked.
easyNot startedSolve
545
Find the Largest Volume Through an Abstract TypeContainer is an abstract class with one abstract method, volume().
easyNot startedSolve
546
Override a Concrete Method From an Abstract ParentAn abstract class can hold finished methods next to abstract ones.
easyNot startedSolve
135
Playlist Deep CopyCreate a class Playlist that implements Cloneable.
mediumNot startedSolve
136
Total Fare for PassesWrite a static method totalFare(TransitPass[] passes, int trips) that returns the sum of calcFare(trips) for all passes.
mediumNot startedSolve
139
Media and Playable SongCreate a Song class that extends an abstract Media class and implements Playable.
mediumNot startedSolve
140
Comparable StudentImplement Comparable<Student> so that higher GPA is considered greater.
mediumNot startedSolve
141
Rethrow ArithmeticExceptionComplete the program so it prints the correct letters by catching and rethrowing an ArithmeticException.
mediumNot startedSolve
142
BusPass toStringCreate a class BusPass that extends TransitPass and adds a String zone field.
mediumNot startedSolve
143
CourseRoster Deep CopyCreate a copy constructor for CourseRoster that deep copies the students array.
mediumNot startedSolve
144
Count Free RidesWrite a static method countFreeRides(TransitPass[] passes, int trips) that returns how many passes cost 0.0 for the given number of trips.
mediumNot startedSolve
149
Build a Sphere ClassComplete the Sphere class with: a constructor that stores the radius, getRadius(), setRadius(double r), getVolume() using (4/3)πr³, getSurfaceArea() using 4πr², and toString() that returns the formatted string with radius, volume, and surface area each rounded to 2 decimals.
mediumNot startedSolve
176
Swap the Values in a Generic PairComplete the swap() method in the Pair<T> class so it exchanges the values of first and second.
mediumNot startedSolve
185
Create a Generic Student RecordComplete the StudentRecord<T, U> class.
mediumNot startedSolve
196
Employee Salary InheritanceCreate a Manager class that extends the provided Employee class.
mediumNot startedSolve
197
Abstract BankAccount with WithdrawAn abstract class BankAccount is provided with a balance field, a deposit(double amount) method, and an abstract withdraw(double amount) method.
mediumNot startedSolve
198
Implement Resizable InterfaceAn interface Resizable is provided with two methods: void resize(double factor) and double getSize().
mediumNot startedSolve
199
Abstract Appliance with Power TrackingAn abstract class Appliance is provided with a boolean isOn field (starts false), turnOn(), turnOff(), and an abstract method int powerUsage().
mediumNot startedSolve
200
Multi-Level Inheritance ChainA base class Animal and a middle class Pet are provided.
mediumNot startedSolve
504
Count Items in a Generic TallyWrite a generic class that counts how many times each item has been added.
mediumNot startedSolve
506
Build a Bounded Generic Range ClassWrite a generic class that represents a range between a low value and a high value.
mediumNot startedSolve
517mediumNot startedSolve
518
Override equals to Compare Two PointsEvery class inherits equals(Object other) from Object.
mediumNot startedSolve
519
Write Two Subclasses of a Game CharacterA GameCharacter class is provided.
mediumNot startedSolve
520mediumNot startedSolve
521mediumNot startedSolve
532mediumNot startedSolve
533
Order Contacts With compareTo on Two FieldsContact already says it implements Comparable<Contact>, but the method that interface requires is missing, so the class does not compile yet.
mediumNot startedSolve
534
Sort Products Two Ways With Comparator ClassesA Comparator is a separate object that tells Java how to order two objects of some other class.
mediumNot startedSolve
535
Write an Interface With a Default Method and Its ClassWrite an interface that has both kinds of method, and a class that implements it.
mediumNot startedSolve
536
Delegate to an Interface-Typed FieldPaymentMethod is an interface with one method, charge(double amount), which returns a line of text saying what happened.
mediumNot startedSolve
547
Write an Abstract Class With a Concrete Label MethodWrite the abstract class Beverage from scratch.
mediumNot startedSolve
548
Write a Concrete Subclass of an Abstract SolidSolid is an abstract class that stores a name and leaves volume() and surfaceArea() abstract.
mediumNot startedSolve
549
Write Two Discounts From One Abstract ParentDiscount is an abstract class: apply(double price) returns the price after the discount, and each kind of discount works it out differently.
mediumNot startedSolve
550
Write a Template Method Over Abstract StepsWrite the abstract class Workout.
mediumNot startedSolve
551
Write a Subclass and Total It Through the Abstract TypeOrder is an abstract class with a protected subtotal and an abstract method total().
mediumNot startedSolve
188
Build a Generic Queue with Two SlotsComplete the MiniQueue<T> class.
hardNot startedSolve
201
Build an Interface-Based Notification SystemCreate two classes, EmailNotifier and SmsNotifier, that both implement the provided Notifier interface.
hardNot startedSolve
202
Abstract Shape Hierarchy with Rectangle and TriangleCreate an abstract class Shape with an abstract method double area() and a concrete method String label() that returns "Shape".
hardNot startedSolve
203
Payroll System with Abstract and InterfaceBuild a small payroll system.
hardNot startedSolve
204
Stackable Interface with Undo HistoryCreate a class UndoHistory that implements the provided Stackable interface to track text actions.
hardNot startedSolve
205hardNot startedSolve