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
Marrrta [24]
3 years ago
9

Write a subclass named 'ReadWrite' with the following additional behavior: Any necessary constructors. a method named 'setVal' t

hat accepts an integer parameter and assigns it the the 'val' instance variable. a method 'isDirty' that returns true if the setVal method was used to override the value of the 'val' variable.
Computers and Technology
1 answer:
nataly862011 [7]3 years ago
6 0

Answer:

Java Class given below

Explanation:

class ReadOnly

{

protected int val;

public ReadOnly(int arg)

{

val = arg;

}

public int getVal()

{

return val;

}

}

class ReadWrite extends ReadOnly

{

private boolean dirty;

public ReadWrite(int arg)

{

super(arg);

dirty = false;

}

public void setVal(int arg)

{

val = arg;

dirty = true;

}

public boolean isDirty()

{

return dirty;

}

}

You might be interested in
Which statement describes borders and shading ?
Marina CMI [18]

Answer: Borders are rules you can add to any or all of the four sides of a paragraph. Shading is the color or artistic design you use as background for a paragraph. Borders and shading are formatting tools for enhancing text, paragraphs, table cells or frames.

3 0
3 years ago
Choose the answer. Janice's IT department found that her computer had a program on it that was collecting her personal informati
harkovskaia [24]

Answer:

Spyware

Spam is just unwanted soliciation, spoofing is making links appear as something else, pharming is creating a fake website for victims to use.

7 0
2 years ago
Modify the Comments.java program from Programming Exercise 1-10 so at least one of the statements about comments is displayed in
Zielflug [23.3K]
This isn’t even a question it’s just instructions for a question. can you elaborate???
4 0
3 years ago
Some commands listed in a menu cannot be selected.<br><br><br> True or False
bogdanovich [222]
True! Have a nice week
4 0
3 years ago
Read 2 more answers
How do I delete my account on Brainly? It says I must enter my password to do so, but I never set up a password. When I try the
Lady_Fox [76]
Try using your email account password
8 0
3 years ago
Other questions:
  • You are attempting to update a Windows image that has been mounted under C:\mount on your local system. What command must you us
    13·1 answer
  • You can access various sites on the WWW by using hyperlinks or by
    14·1 answer
  • The ____ refers to a world where everyday physical objects are connected to, and uniquely identifiable on, the Internet so they
    6·1 answer
  • How can i become an expert in computer and technology?
    15·2 answers
  • Your boss bought a new printer with a USB 3.0 port, and it came with a USB 3.0 cable. Your boss asks you:
    7·2 answers
  • A web page ____ can also create a style sheet that takes precedence over the internal style sheets of browsers.
    10·1 answer
  • A production house needs an operating system that captures saves and generates information within a specific time. Which type of
    11·1 answer
  • True or false: The objective of an Enterprise Resource Planning (ERP) system is to create a customized software program that int
    10·1 answer
  • Differentiate between perfect and imperfect market​
    14·1 answer
  • Cable Internet access can be described with which feature?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!