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
inna [77]
3 years ago
8

Assume the existence of a Phone class with a method, clear, that clears the phone's memory-- its phone book, list of call, text

messages, etc. Assume also, a subclass CameraPhone with an instance variable, album, of type PhotoAlbum-- which has a method, also called clear that clears its contents. Override the clear method in CameraPhone to clear the entire phone, i.e., to invoke the clear method of Phone (the superclass), as well as invoking the clear method of the album instance variable.
Computers and Technology
1 answer:
bulgar [2K]3 years ago
8 0

Answer:

The following are the code.

//define function

public void clear() {

//override clear method

super.clear();

album.clear();

}

Explanation:

In the above code of the Java Programming Language, we define the void type function "clear()" which is used to clear the elements of the list or set, inside the following function we override the clear() function. Firstly, we set clear() with super then, we set clear() method with album in CameraPhone for clear the photos.

You might be interested in
Write an example method that overrides the operator to create a new book whose title is a concatenation of the titles of two boo
Anastasy [175]

next time m8 mmmmmdsaasd

5 0
3 years ago
A stepping function allows a program
vichka [17]

Answer:

To be inspected line by line.

Explanation:

8 0
4 years ago
Read 2 more answers
The valence electron configurations of several atoms are shown. how many bonds can each atom make without hybridization? 2s^2 2p
Pie
Answer: This element needs 3 electrons to complete its octet state

Why?:
since the electrons in 2s2 are already paired they cannot form a bond pair with electrons from other elements without hybridisation however the 3 electrons in 2p3 are unpaired so can form bond pairs with electrons from other elements without hybridisation.

Hope this helps!
3 0
4 years ago
What does % find on edhesive??
statuscvo [17]

Answer:

Explanation: What is that word you typed?

3 0
3 years ago
To have a set of command
GalinKa [24]

Every program that interacts with people responds to a specific set of commands. The set of commands and the syntax for entering them is called the user interface and varies from one program to another. The DOS operating system makes a distinction between internal and external commands.

3 0
3 years ago
Other questions:
  • Francis has designed a picture book appropriate for third graders. He wants teachers across the world to freely download use, an
    9·1 answer
  • Give 5 uses of software and hardware.
    15·1 answer
  • Free 100 point to first to answer
    5·2 answers
  • What is an online recommendation engine?
    9·1 answer
  • Write a program that prompts the user for an integer and then prints all prime numbers up to that integer.
    7·1 answer
  • Unicode is a world standard to represent _________________
    10·1 answer
  • Write down the functions of network layer in your own words.ASAP
    14·1 answer
  • Above all else, be...
    8·1 answer
  • Which of the following is a characteristic of vector graphics?
    15·2 answers
  • Help with Java, please!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!