1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kirill115 [55]
3 years ago
13

All windows on the desktop have width and height (as well as numerous other attributes). However the actual contents of the wind

ow change both in structure and appearance depending upon what sort of window is displayed (e.g. a word processing window will display text, a color chooser window display a pallette of colors, a file chooser window displays a directory tree, etc). Thus, the details of the method to actual fill the contents of the window must be deferred to the subclasses of the Window class Write the definition of an abstract class, Window, containing the following: two integer instance variables, width and height, two accessor methods, getWidth and getHeight, a constructor that accepts two integers and uses them to initialize the two instance variables (the parameters should be width followed by height), and an abstract void-returning method named paint that accepts no parameters.
Computers and Technology
1 answer:
Cerrena [4.2K]3 years ago
6 0

Answer:

The abstract class Window:

public abstract class Window

Two integer instance variables, width and height:

private int width, height;

Two accessor methods, getWidth and getHeight:

public int getWidth()

public int getHeight()

A constructor that accepts two integers and uses them to initialize the two instance variables:

public Window(int var1, int var2) {width =var1; height = var2;}

An abstract void-returning method named paint that accepts no parameters

public abstract void paint();

Explanation:

Abstract keyword is used with Windows class to make this class an abstract class which means no object can be created using this class.

Two private instance variable width and height. Private means they are not accessible outside this class.

Then getWidth and getHeight methods are used to return width and height.

The constructor takes two integer type variables var1 and var2. These two variable are used to initialize the variables width and height. Constructor has the same name as that of the class.

Method paint() is an abstract method with the return type void which has no parameters.  

So here is what the class with all its methods and instance variables looks.

public abstract class Window {

private int width, height;

public Window(int a, int b) {width = a; height = b;}

public int getWidth(){ return width; }

public int getHeight(){ return height; }

public abstract void paint();

}

You might be interested in
Your friend Cameron’s little sister is visually impaired. Cameron is worried that his sister will not be able to use technology
IceJOKER [234]
All modern technology has things to help disabled people
5 0
2 years ago
How can you employ one of the most powerful interactive business tools on the Internet today?
Dovator [93]

Answer:start a blog. I read the book.

Explanation:

7 0
3 years ago
Which shortcut key aligns text to the center of the paige
borishaifa [10]

Answer:

ctrl e then ctrl r

Explanation:

i used google cause im a. gooooddddddddd

6 0
3 years ago
ABC company have lots of computer running window 7. But they are not thinking to upgrade a higher version of window. One of the
Alexxx [7]

First threat

  • It's malware
  • Because chrome OS is not much secure as compare to windows 11 (Prime opponent)

2nd threat

  • It's speed
  • Chrome OS is litreally very slow .
  • On comparing to windows edition it lacks in multiple factor so you work per unit tike decreases

Third threat

  • You may be able to use Android apps but windows is made for Computers
  • In several factors like ads,cleanness chrome OS will create problems
5 0
2 years ago
Myles is studying a system to lessen the number of complaints about the Help Desk. He has formally studied the service counter a
olga55 [171]

Answer: Informal bench-marking

Explanation:

Informal bench-marking is defined as unconscious comparison of one's own behavior, skills, values etc with other and learning from them to improve. This leaning can be found in work-place, home, school etc.

  • According to the question, Myles is using informal bench-marking through studying other stores complaint handling style and reduction technique so that he can learn from it.
  • Other options are incorrect because designing analysis,outcome analysis, issue analysis and processing of complaining ta re not the comparison that unconsciously done by person .
  • Thus, the correct option is informal bench- marking.
4 0
3 years ago
Other questions:
  • What are some causes of the number of bytes on the wire exceeding the number of bytes being captured?
    6·2 answers
  • Is it possible to uninstall a program that's on your phone from computer?
    8·1 answer
  • After compiling source code, which command still needs to be run in order to copy the newly compiled binaries into a directory l
    5·1 answer
  • Without entering into the internet cloud or intranet cloud, how many icons in the topology represent endpoint devices (only one
    6·1 answer
  • What is the code name for the 12 engineers who developed the ibm pc?
    8·1 answer
  • Which is a benefit of getting information from a government website?
    15·2 answers
  • A user purchased a new smart home device with embedded software and connected the device to a home network. The user then regist
    5·1 answer
  • Which task would most likely be completed by a physician’s assistant?
    12·1 answer
  • Jason is the motion picture projectionist at the local IMAX theater. This means that he runs the huge movie projector so that cu
    12·1 answer
  • Which of these is a possible disadvantage of working with a team?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!