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
nirvana33 [79]
3 years ago
8

Given the class 'ReadOnly' with the following behavior: A (protected) integer instance variable named 'val'. A constructor that

accepts an integer and assigns the value of the parameter to the instance variable 'val'. A method name 'getVal' that returns the value of 'val'. Write a subclass named 'ReadWrite' with the following additional behavior: Any necessary constructors. a method named 'setVal' that 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:
Dafna1 [17]3 years ago
7 0

Answer:

I believe you want a subclass so here it is!

public class ReadWrite extends ReadOnly {

public ReadWrite(int initialValue){

super(initialValue);

}

private boolean modified = false;

public void setVal(int x) {

val = x;

modified = true;

}

public boolean isDirty() {

return modified;

}

}

Explanation:

I might be wrong, just check through it in case

Hope this helped

:)

You might be interested in
The purpose of an Internet _____ is to receive packets and send them along towards their final destination.
Bumek [7]

The tool that receives packets and send them along towards their final destination is; Internet Server

<h3>Internet Servers</h3>

We are told that the tool is used to receive packets and send them along towards their final destination.

  • Now, the tool is an internet server because internet servers are softwares and hardwares that make use of HTTP and other protocols to respond to client requests that are made over the World Wide Web.

Now, the main job of an internet server is to display website content through storing, processing and delivering webpages to the final destination.

Read more about internet server at; brainly.com/question/20602197

7 0
2 years ago
Choose the correct term to complete the sentence.
Andre45 [30]

Answer:

Technology

Explanation:

Edge 2021

8 0
2 years ago
Life can get busy and hectic but relationships matter what is an effective way to mending relationships that may have been negle
Galina-37 [17]
Staying and working thing out or getting help
8 0
2 years ago
High-end tools in project management software have enterprise and _____ functions that summarize and combine individual project
e-lub [12.9K]

Answer:

Portfolio management  is the correct option.

Explanation:

Project management software is that type of software that is used to accomplish the management related works such as planning, organizing, summarizing and many other works related to the management.

So, project management software is used for functioning the enterprise and portfolio management functions by which the employee combines and summarizes project information.

8 0
3 years ago
When you think of computers, I want you to think:
jekas [21]

Answer:

Explanation:

When I think about computers, I can understand about the software and the hardware, we can touch the hardware, but the software don't because is only data stored in the hardware, we can interact with the stored data using the hardware, we can complete a system with data, software, hardware, and people, people try to learn about software because it is better paid than fix a hardware.

5 0
2 years ago
Other questions:
  • Which of the following statements about Java Class Libraries is false: a. Java class libraries consist of classes that consist o
    9·1 answer
  • What is the typical relationship between time and interest rate?
    12·1 answer
  • What sugar is used in a DNA molecule​
    7·2 answers
  • In this website/app what are the points for?
    7·1 answer
  • When someone registers a domain name that is a company's trademark, hoping to resell it to the company at an exorbitant profit,
    14·2 answers
  • The IT department sent out a memo stating that it will start delivering desktop computer interfaces through the IT data center v
    5·1 answer
  • Word can store a maximum of how many documents in its Recent Documents area? five ten fifteen twenty
    8·1 answer
  • What privacy risks do new technologies present,<br> and how do we decide if they're worth it?
    11·1 answer
  • Write, in your own words, a one-two paragraph summary on the Running Queries and Reports tutorials. Apply critical thinking and
    10·1 answer
  • Which spreadsheet feature could the scholarship committee use to locate applicants who meet the criteria?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!