please modify this: display method must call displayNormal
Q: tity; private int capacity; private int seatsTaken; public DesertEvent(String eventName, String…
A: Here is a possible implementation of the Driver class (TestDesertEvent):
Q: public class DebugBox
A: Approach Here, DebugBox class is created to calculate the volume of a box N the class, the…
Q: public class StudentsLI extends Students{ public String svName; public String companyName; public…
A: I created a override grading method as per your requirement and also gives the code along with…
Q: Mickey Mouse In this labwork are asked to write a GUI application using AWT. It is highly advised…
A: import java.awt.*;import java.awt.event.*; public class Mickey extends Frame implements…
Q: Implement the design of the Student class so that the following output is produced: Driver Code…
A: In the question above, we are asked to create a class such that the Driver code gives the Output…
Q: Discuss the challenges and considerations in selecting the appropriate microchip for a specific…
A: Because Microchip provides a broad variety of microcontrollers designed for diverse use cases,…
Q: Implement the design of the EPL_Team class so that the following output is produced: Driver Code…
A: class EPL_Team:def __init__(self,name,*args):self.name=nameif…
Q: public class Shape { Color fillColor; } public Shape() } fill Color = Color. RED; } public…
A: Lets talk about shape class(which is base class of Circle class): -->having attribute/data…
Q: The Giant Panda Protection and Research Center in the Sichuan province of southwest China, actually…
A: Task : Define the Panda class and produce the given output.
Q: The base class Pet has protected fields petName, and petAge. The derived class Cat extends the Pet…
A: The main() method of a program that makes instances of the Pet and Cat classes and prints their…
Q: public class Car { public void m1( { Sustem.Qut.printla("car 1"); } public void m2() { super.m1(); }…
A: answer is
Q: public class Driver { /** * @param args */ static Scanner keyboard = new…
A: The issue in the original code was that the break; statement inside the case 5: block only broke out…
Q: Question 8 Design the Student class such a way so that the following code provides the expected…
A: class Student: name = "" idNum = 0 hour = 0 department = "" def __init__(self,…
Q: package assignment; public class Circle2D2 { //data fields specifying the center of the circle…
A: Actually, program is executable software that runs on a computer.
Q: private: int x, у;
A: Corrected Program: #include<iostream.h> #include<conio.h> class Point { private: int…
Q: This lab will demonstrate how the toString() and equals() methods work when they a not overridden.…
A: for tostring()
Q: 1. Remove the errors, warnings and mistakes that are in the source code. 2. Modify the code so…
A: public classes has to be declared in its own files So, the Debugging class which has main will be…
Q: Complete the missing line of code: public class Rectangle { private int width; private int height;…
A: The problem is based on parameterised constructors in C++ language.
Q: 9 public class PictureViewer 10{ public static void main(String[] args) { // Step 2: Fix the syntax…
A: public class PictureViewer {public static void main(String[] args) { // Error 1: Here object should…
Q: Write single and multiline comments to clarify the code public class Image { int numberOfPhotos;…
A: public class Image { // name of the classint numberOfPhotos;…
Q: Implement the following class MyPhoneBook. You can add additional private member variables and…
A: Actually, program is an executable software that runs on a computer.
Q: class box { int width; int height; int length; int volume;…
A: The given code:- class box { int width; int height; int length; int volume; void…
Q: Q1. amount the same, y, n, why? public class CheckingAct { private String actNum; private…
A: Dear Student, We valued your time. But as per guidelines, I can give answer only to the first…
Q: Design the ParcelKoro class such a way so that the following code provides the expected output. Hint…
A: There are three instance variables of class name, product_weight and total_fee
Q: Implement the design of the Author class so that the following output is produced:
A: Solution: Programming language used: Python Program Code in Python: (Note: all necessary comments…
Q: Given a base Plant class and a derived Flower class, complete main() to create an ArrayList called…
A: Algorithm:Create an empty ArrayList called myGarden to hold Plant or Flower objects.Initialize an…
Q: Public classTestMain { public static void main(String [ ] args) { Car myCar1,…
A: Solution: Given,
Q: public class SidePlot { public static String PLOT_CHAR = "*"; public static void main(String[] args)…
A: I have provided JAVA CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT------
Q: Based on Figure 3, create a class named Child that inherits the Father class. Declare an instance…
A: class Child extends Father // class Child inherits class Father { } class Inheritance{…
Q: Complete the Course class by implementing the printRoster() method, which outputs a list of all…
A: Create a Course object representing a course.Initialize variables first, last, and gpa to store…
Q: Stairviewer public static void main(String (] args) // Step 2: Create a rectangle and draw it as the…
A: ANSWER: Draw Rectangle in C graphics: Draw rectangle for utilized Rectangle(). Directions of left…
Q: Create a subclass named Square from the superclass GeometricObject. Create an instance variable…
A: Sub Class is a class which inherits the other class. It is also called a derived class or child…
Q: private OnlineStudent readOnlineStudent(Scanner pIn) { String id = pIn.next(); String lname =…
A: We need to rectify the errors in the given code.
Q: double diameter =2- radius;
A: public class DebugFour2{ public static void main(String args[]){ //start main method where program…
Q: #pyhton programing topic: Introduction to Method and Designing class Method overloading &…
A: Please find the below Python code class Account(): def __init__(self, name='Default Account',…
Q: Question (2) Create a new package (employee2), solve the error and trace the output import…
A: Employee.java package employee;public class Employee{public StringfirstName,lastName;public int…
Q: Question 9 Implement the design of the Patient class so that the following output is produced: [You…
A: According to the output given:- We have to implement the design of the Patient Class and follow…
Q: public class DesertEvent { private static int eventCount = 0; private String barCode; private String…
A: Java is a platform-independent, object-oriented programming language used programming language for…
please modify this: display method must call displayNormal
Window class
abstract class Window implements GUIComponent {
private int height, width;
private boolean isThisVisible, minimized;
public Window(int width, int height){
this.height = height;
this.width = width;
}
public int getHeight() {
return height; }
public int getWidth() {
return width; }
public String toString() {
return "a " + width + "x" + height + " minimal window"; }
public void resize(int width, int height){
this.width = width;
this.height = height;
}
public void display() {
if (!isThisVisible) {
System.out.println("(Nothing to see here)");
}
else if (!minimized) {
System.out.println(".......................\n:" + toString() + ":\n.......................");
}
else {
System.out.println("[" + this.toString() + " (minimized)]");
}
}
public void minimize(){
minimized = true;
}
public void setVisible(boolean isThisVisible) {
this.isThisVisible = isThisVisible; }
public void restore(){
minimized=false;
}
public boolean isVisible() {
return isThisVisible;
}
abstract void displayNormal();
}
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- public class DesertEvent { private static int eventCount = 0; private String barCode; private String location; private String eventName; private String eventType; private int quantity; private int capacity; private int seatsTaken; public DesertEvent(String eventName, String eventType) { this(eventName, eventType, 0); calcMaximumSeats(eventType); generateBarCode(); } public DesertEvent(String eventName, String eventType, int capacity) { this.eventName = eventName; this.eventType = eventType; this.capacity = capacity; generateBarCode(); eventCount++; } public String getBarCode() { return barCode; } public String getLocation() { return location; } public String getEventName() { return eventName; } public String getEventType() { return eventType; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public int getCapacity() { return capacity; } public void setCapacity(int capacity) { this.capacity = capacity;…public class DesertEvent { private static int eventCount = 0; private String barCode; private String location; private String eventName; private String eventType; private int quantity; private int capacity; private int seatsTaken; public DesertEvent(String eventName, String eventType) { this(eventName, eventType, 0); calcMaximumSeats(eventType); generateBarCode(); } public DesertEvent(String eventName, String eventType, int capacity) { this.eventName = eventName; this.eventType = eventType; this.capacity = capacity; generateBarCode(); eventCount++; } public String getBarCode() { return barCode; } public String getLocation() { return location; } public String getEventName() { return eventName; } public String getEventType() { return eventType; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public int getCapacity() { return capacity; } public void setCapacity(int capacity) { this.capacity = capacity;…public class Car { public void m1() { System.out.Rrintln("car 1"); } public void m2() { super.m1(); } public void m2() { Sustem.out.printla("car 2"); } public String toString() { return super toString() + super toString(); } public String toString() { return "vroom"; } } Create a client class and add the following statements. What is the output? Is it the same as you expected? public class Truck extends Car { public void m1() { System.out.Rrintin("truck 1"); } Truck mytruck = new Truck (); Sustem.out.printinlaxtruckl: // Output: mytruck.m1(); mytruck.m2(); // Output: // Output:
- Write single and multiline comments to clarify the code public class Image {int numberOfPhotos;double fStop;int iso;int filterNumber;String subjectMatter;String color;String location;boolean isblurry;public String looksBlurry(boolean key){if ( key == true){return "Photo is Blurry";}else{return "Photo is Clear";}}public void printPhotoDetails (){System.out.println("----------------------------------");System.out.println("Printing details of current photo:");System.out.println("----------------------------------");System.out.println("This is a/an " + subjectMatter +"roll:" + "in: " + color + "using filter: "+ filterNumber + ".");System.out.println("It has " + numberOfPhotos + "photos with " + fStop + "fStop." );System.out.println("This photo was taken near the"+ location + "with film at: " + iso + "ISO:"+ ".");if (isblurry == true){System.out.println("You can post it.");}else {System.out.println("You should post it.");}}}public class DebugBox { privateint width; privateint length; privateint height; publicDebugBox() { length = 1; width = 1; height = 1; } publicDebugBox(intwidth,intlength,intheight) { width = width; length = length; height = height; } publicvoidshowData() { System.out.println("Width: " + width + "Length: " + length + "Height: "+ height); } publicdoublegetVolume() { double vol = length * width * height; return vol; } } // This class uses a DebugBox class to instantiate two Box objects public class DebugFour3 { publicstaticvoidmain(Stringargs[]) { int width =12, length = 10, height = 8; DebugBox box1 =newDebugBox(); DebugBox box2 =newDebugBox(width, length, height); System.out.println("The dimensions of the first box are"); box1.showData(); System.out.print("The volume of the first box is "); showVolume(box1); System.out.println("The dimensions of the second box are"); box2.showData(); System.out.print("The volume of the second box is "); showVolume(box2); }…public class Plant { protected String plantName; protected String plantCost; public void setPlantName(String userPlantName) { plantName = userPlantName; } public String getPlantName() { return plantName; } public void setPlantCost(String userPlantCost) { plantCost = userPlantCost; } public String getPlantCost() { return plantCost; } public void printInfo() { System.out.println(" Plant name: " + plantName); System.out.println(" Cost: " + plantCost); }} public class Flower extends Plant { private boolean isAnnual; private String colorOfFlowers; public void setPlantType(boolean userIsAnnual) { isAnnual = userIsAnnual; } public boolean getPlantType(){ return isAnnual; } public void setColorOfFlowers(String userColorOfFlowers) { colorOfFlowers = userColorOfFlowers; } public String getColorOfFlowers(){ return colorOfFlowers; } @Override public void printInfo(){…
- Complete the missing line of code: public class Rectangle { private int width; private int height; public Rectangle( this.width = width3B %3D this.height = height; %3Dpublic class Side Plot { * public static String PLOT_CHAR = "*"; public static void main(String[] args) { plotxSquared (-6,6); * plotNegXSquaredPlus20 (-5,5); plotAbsXplus1 (-4,4); plotSinWave (-9,9); public static void plotXSquared (int minX, int maxx) { System.out.println("Sideways Plot"); System.out.println("y = x*x where + minX + "= minX; row--) { for (int col = 0; col row * row; col++) { System.out.print (PLOT_CHAR); if (row== 0){ } System.out.print(" "); } for(int i = 0; i <= maxx* maxX; i++) { System.out.print("-"); } System.out.println(); Sideways PHOT y = x*x where -6<=x<=6 Sideways Plot y = x*x where -6<=x<=6 How do I fix my code to get a plot like 3rd picture?private OnlineStudent readOnlineStudent(Scanner pIn) { String id = pIn.next(); String lname = pIn.next(); String fname = pIn.next(); OnlineStudent student = new OnlineStudent(id, fname, lname); String fee = pIn.next(); int credits = pIn.nextInt(); if (fee.equals("T")) { student.setTechFee(true); else { student.setTechFee(false); } student.setCredits(credits); return student; keep getting class, interface,enum or record expected. I need help
- public class DebugBox { private int width; private int length; private int height; public DebugBox() { length = 1; width = 1; height = 1; } public DebugBox(int width, int length, height) { width = width; length = length; height = height; } public void showData() { System.out.println("Width: + width + " Length: " + length + " Height: "+ height); } public double getVolume() { double vol = length + wdth + height; return vol; } } public class DebugFour3 { public static void main(String args[]) { int width = 12, length = 10, height = 8; DebugBox box1 = new DebugBox(); debugBox box2 = new DebugBox(width, length, height); System.out.println("The dimensions of the first box are"); box1.showData; System.out.print(" The volume of the first box is "); showVolume(box1); System.out.println(The dimensions of the…mcqQ1. amount the same, y, n, why? public class CheckingAct { private String actNum; private String nameOnAct; private int balance; . . . . public void processDeposit( int amount ) { balance = balance + amount ; } // modified toString() method public String toString() { return "Account: " + actNum + "\tName: " + nameOnAct + "\tBalance: " + amount ; } } Q2. amount the same, y, n, why? public class CheckingAct { private String actNum; private String nameOnAct; private int balance; . . . . public void processDeposit( int amount ) { // scope of amount starts here balance = balance + amount ; // scope of amount ends here } public void processCheck( int amount ) { // scope of amount starts here int charge; incrementUse(); if ( balance < 100000 ) charge = 15; else charge = 0; balance = balance - amount - charge ; // scope of amount ends here }…
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)