In Java:

Assume the availability of an existing class, ICalculator, that models an integer arithmetic calculator and contains:

a private instance variable currentValue that stores the current int value of the calculator
a getter method for the above instance variable
methods add, sub, mul, and div
Each method in ICalculator receives an int argument and applies its operation to currentValueand returns the new value of currentValue. So, if currentValue has the value 8 and sub(6) is invoked then currentValue ends up with the value 2, and 2 is returned.

Write a public subclass, ICalculator1, based on ICalculator. The class ICalculator1 has one additional method, sign, that receives no arguments, and doesn't modify currentValue. Instead, it simply returns 1, 0 or -1 depending on whether currentValue is positive, zero, or negative respectively.

Answers

Answer 1

Answer:

A subclass?

Explanation:

Answer 2

A public subclass for ICalculator1 has one additional method, sign, that receives no arguments, and doesn't modify current Value. Instead, it simply returns 1, 0 or -1 depending on whether current Value is positive, zero, or negative respectively.

What is public subclass?

A member's access is declared to be public with the Java keyword public. All other classes can see members of the public class. This implies that a public field or method can be accessed by any other class. In addition, public fields can be changed by other public subclass or classes unless they are marked as final.

Further a subclass is defined as a class that is descended from another class (also a derived class, extended class, or child class). A superclass is the class from which a subclass is descended (also a base class or a parent class).

A public subclass for ICalculator1 has one additional method, sign, that receives no arguments, and doesn't modify current Value:

In Java,

public class ICalculator1 extends ICalculator {

public int sign() {

if (getCurrentValue() > 0)

return 1;

else if (getCurrentValue() == 0)

return 0;

else

return -1;

}

}

Therefore  the availability of an existing class, I-Calculator, that models an integer arithmetic calculator, above public subclass has been made.

Learn more about public subclass:

https://brainly.com/question/15992142

#SPJ12


Related Questions

5. All of the following are part of a cylinder head EXCEPT:
OA. Water pump
OB. Combustion chamber
OC. Valve guides
OD. Valve seats

Answers

Answer:

Wouldn't it be B? I mean a combustion chamber is where the fuel and air mixture are injected to be ignited and burned to produce power to a vehicle.

2) Some graphics have usage restrictions on them. What are some copyright laws out there that affect usage of images, graphics, and photos?

(I don’t really understand what they’re asking, any help is appreciated!)

Answers

Explanation:

Ok what is Copyright The copy of something without using credit

Why do computers use binary code?

Answers

Answer:

To make sense of complicated data, your computer has to encode it in binary. Binary is a base 2 number system. Base 2 means there are only two digits—1 and 0—which correspond to the on and off states your computer can understand

Answer:

It has two clearly distinct states that provide a safety range for reliability and the least amount of necessary circuitry, which results in the least amount of space, energy consumption, and cost.

Need answer ASAP. I’ll mark brainliest if correct

Answers

Answer:

I am pretty sure for the first option the answer is tasks, and for the second option, it is logical.

Explanation:

"tasks to be performed in a logical manner" sounds right to me.

5.10.4: Snake Eyes

My code:


var SENTINEL = 1;




function start(){


var diceOne;


var diceTwo;




while(true) {

println("" + diceOne + "," + diceTwo);


diceOne = Randomizer.nextInt(1,6);


diceTwo = Randomizer.nextInt(1,6);




if (diceOne && diceTwo == SENTINEL){

println("" + diceOne + "," + diceTwo);


break;


}


}

}






What am I doing wrong here?

Answers

Answer:

You didn't specify what the function actually does. BTW, good luck coding, I love coding and it is lots of fun, just stick with it!

Explanation:

Does anyone know what episode Hinata threatens useless sakura?

Answers

Answer:

it was in 367 or in the 400 it was a dream that ten ten had

Explanation:

Which term describes the gallery that allows you to customize and format text as a graphic?

Pull Quote
Text Box
WordArt
Drop Cap

Answers

Answer:

Word Art

sWord art as the ability to be custom designed and formatted as a graphic

Answer:

Word Art

Explanation:

According to programming best practices, how should you handle code that needs to be repeated several times in a program?
Store the code on a website and reference the website when it is needed.
O Store the code only in a code library, not in the actual app's code.
Have the code appear only once in the program and reference it when it is needed.
O Copy the code as many times as needed so that each usage is separate.

Answers

Explanation:

Copy the code as many times as needed so that each usage is separate.

Twenty staff members will be doing data entry activities from 10 p.m. to 3 a.m. on a regular basis. You could check if a given operating system will handle this activity by performing _____.

soak testing.
stress testing
load testing
spike testing

Answers

I would say Stress Testing and if not that than Load Testing

Describe an example of organisms with different niches in an ecosystem.

Answers

Explanation:

Organism seems to have its own bearable environments for many ecological parameters and blends into an ecological system in its own unique way. A aquatic species' niche, for particular, can be characterized in particular by the salt content or saltiness, pH, and surrounding temperature it can absorb, and also the kinds of food it can consume.

Give five examples of physical networking.

Answers

Answer:

Fully connected Network Topolgy, Common Bus Topolgy, Mesh Network Topolgy, Star Network Topolgy, and Ring Network Topolgy.

Explanation:

Which of the following best describes what a long-term goal is?

Answers

What are the options?

4. What type of electromagnetic waves does a computer scanner use? Explain how the photoelectric effect is an important part of this process. (2 points)

Answers

Answer:

Computed tomography

Explanation:

Study of the photoelectric effect led to important steps in understanding the quantum nature of light and electrons and influenced the formation of the concept of wave-particle duality. The photoelectric effect is also widely used to investigate electron energy levels in matter.

A  type of electromagnetic wave a computer scanner use is high-frequency radio waves.

The concept of wave-particle dualism was developed and key milestones in the understanding of the fundamental nature of light and electrons were made possible by research into the photoelectric effect.

What is the use of a computer scanner?

A scanner is a tool that digitizes information by scanning or taking a photo of a document and displaying it on a computer screen. It makes it easier for both teachers and students to copy instructional resources like documents and pictures, as well as to take and preserve pictures.

Discovering the quantum nature of light was advanced by research into the photoelectric effect. Examining the electron energy levels of the matter is another common application of the photoelectric effect.

Learn more about  computer scanners, here:

https://brainly.com/question/14259590

#SPJ5

What protects your computer so that it doesn't get a computer virus?

Answers

Answer:

an anti-virus program such as avg

An anti virus program or a vpn also protects your information and makes all of the stuff on your computer safe

Leah wants to add an image to her updated presentation, so she wants to access the Help interface. What should Leah do to access the interface?

Answers

Answer: 0

Explanation: 1/2

Answer:

a

Explanation:

How does cybercrime impact the economy? Select 3 options,
People lose their job
Intellectual property is stolen,
It stimulates the economy.
Businesses are ruined,
Opportunities are created.

Answers

Answer:

People lose their jobs.

Intellectual property is stolen.

Businesses are ruined.

Explanation:

got it right on edge

Cybercrime impact the economy by:

People lose their jobs.Intellectual property is stolen.Businesses are ruined.

What is the effect of cybercrime in the economy?

The growing rate of  cybercrime issues is one that has lead to high cost in the economy  of the world and it has also lead to global losses.

Conclusively, a lot of business has closed up due to cybercrime and the government now spends resources that can be used for other purposes to fight cybercrime.

Learn more about Cybercrime from

https://brainly.com/question/25157310

A project manager would employ people who have a marketing background to work on which phases of the mobile app development process?

design and development
deployment and possibly discovery
support and possibly discovery
development and testing

Answers

Answer:

Development and discovery :)

Hope this helps!!!!!!!

Explanation:

in what tab the translate button found

Answers

Answer:

Display the Review tab of the ribbon and click the Language tool and then click Translate. Click Translate Selection. Word displays the Translator pane. (A window may appear on the screen after clicking Translate Selection asking you to turn on Translation Services.)

     

                                      Hope this helps : )

What strategies do businesses use to protect their networks from internal threats?
select all that apply
-having employees change their passwords regularly
-requiring a login to access the network
-using dial-up connections to access the Internet
-implementing peer-to-peer networking
-providing employees with access privileges

Answers

Answer:

I think the answers would most definitely be requiring a login to access the network because if businesses had a network with no login, anyone could get into it. Others would be providing employees with access privileges so that way ONLY employees may get into certain things, and possibly having employees change their passwords regularly so that way, anyone who has the employees previous password can't log in at any time to steal anything cause it's changed.

Hope this helped! Have a great day! - Olli :]

I NEED THIS ASAP!!! I"LL GIVE 30 PTS.!!!

2 things are required to make a loop: a. ______________ b. _____________

Answers

Answer:

(not quite sure what the question is asking seems you need, but bare minimum is)

an initial value and an increment or decrement

a condition where the loop stops

Explanation:

assuming you have the structure for the loop, depending on the language it could be a for, while or until command. You will always need the initial value for the variable your looping on, how it changes (increment or decrement) and then a condition when the looping in to stop.

e.g. say you want to add up the numbers from 1 to 10, inclusive

sum = 0

for I is 1 to 10 incremented by 1

sum=sum+I

end of loop

(14) Click on the
sloping forwards
button to change the selected text to appear
(Bold Italic)​

Answers

Click on which button to change the selected text to appear sloping forward: Mouse button

What are the functions of a mouse?

To give you an idea of all the mouse capabilities, here is a list of all the computer mouse functions and options.

Move the mouse pointer on the screen - The primary function is to move the mouse pointer on the screen.

Point - After moving the mouse, you can point something out to another user or a digital object. In a game, for example, you can use the mouse to point a gun in the direction you want to shoot.

Open or run a programme - After pointing to an icon, folder, or other object, clicking or double-clicking that object opens the document or runs the programme. Some programmes even allow you to triple-click. For more information on, please visit our click page.

To know more about Mouse, click on the link :

https://brainly.com/question/14399800

#SPJ1

Ashton assigned a string value to a variable. Which program statement should he use?

1myAge = "thirteen"
my age = "thirteen"
myAge = "thirteen"
myAge! = "thirteen"

Answers

Answer: c because there cant be numbers or simboles also nooooooo spaces

Explanation:

brainlyist plz

Answer:

myAge = "thirteen"

Explanation:

Which code segment results in "true" being returned if a number is even? Replace "MISSING CONDITION" with the correct code segment.

function isEven(num){

if(MISSING CONDITION){

return true;

} else {

return false;

}

}


A. num % 2 == 0;

B. num % 0 == 2;

C. num % 1 == 0;

D. num % 1 == 2;

Answers

Answer:

The answer is "Choice A".

Explanation:

In this code, a method "isEven" is declared that accepts the "num" variable in its parameter, and inside the method and if block is declared that checks the even number condition if it is true it will return a value that is "true" otherwise it will go to else block that will return "false" value, that's why other choices are wrong.

The correct code segment that tests if a number is even is num % 2 == 0

When a number is divided by 2, and the remainder after the division is 0, then it means that the number is an even number.

Assume the variable that represents the number is num

The condition that tests for even number would be num % 2 == 0

Hence, the correct code segment that tests if a number is even is (a) num % 2 == 0

Read more about boolean statements at:

https://brainly.com/question/2467366

Consider the conditions and intentions behind the creation of the internet—that it was initially created as a tool for academics and federal problem-solvers. How might that explain some of the security vulnerabilities present in the internet today?

Answers

Answer:

Problem solvers are smart, practical, well-informed, and well-intentioned. However, not everyone uses the internet to address a problem for the greater good these days. As a result, because it was designed for good deeds, there is plenty of room for terrible deeds now.

Best beginner racing drones?

Answers

One that are somewhere between 200-400 for the good quality

Answer:

Walkera Runner 250

Explanation:

This drone is durable, and offers a lot of features while not totally being over the top!

En la historia del Computador porque se caracteriza la primera generación? *
1 punto
a.Por que se reemplazo el ábaco
b.ninguna de las anteriores
c.Por la implementación del calculo
d.Por el uso de tubos de vacío

Answers

D. Por el uso de tubos de vacio.

True or False A safety data sheet (SDS) is a technical document or bulletin that summarizes the health and safety information available about a controlled product.

Answers

Answer:

True.

Explanation:

The Occupational Safety and Health Administration (OSHA) is a federal agency saddled with the responsibility of assuring and ensuring safe and healthy working conditions for employees by setting and enforcing standards, providing education, trainings and assistance to various organizations.

According to the Occupational Safety and Health Administration (OSHA), trainings on the adoption and application of safety precautions (tools) such as wearing a personal protective equipment e.g masks (respirators), ear plugs, safety boots, gloves, helmet, etc. are very important and are essentially to be used by employees (workers) while working in a hazard prone environment or industries. Therefore, all employers of labor are required to provide work tools and ensure that their employees properly use those tools, as well as abide by other safety precautions and standards highlighted in the safety data sheet.

A Safety Data Sheet (SDS) can be defined as a text-based document or bulletin that provides information with respect to the chemical and physical properties such as flammability, temperature, radioactivity, etc., of a substance or equipment. Also, it contains information on the potential health hazards and safety precautions for proper use (handling), storage and transportation of such substance or equipment.

Hence, a safety data sheet (SDS) is a technical document or bulletin that summarizes the health and safety information available about a controlled product such as toxic chemicals, radioactive elements, weapons or ammunition, etc.

How does computer science play a role in art?

Answers

Answer:

Many artists now learn to code; computer scientists develop algorithms with aesthetics as the goal. Projects such as Deep Dream, a program that uses neural networks to produce new visuals, let anyone use AI approaches to generate, ostensibly, art.

A summer camp offers a morning session and an afternoon session. The list morningList contains the names of all children attending the morning session, and the list afternoonList contains the names of all children attending the afternoon session.
Only children who attend both sessions eat lunch at the camp. The camp director wants to create lunchList, which will contain the names of children attending both sessions.
The following code segment is intended to create lunchList, which is initially empty.

It uses the procedure IsFound (list, name), which returns true if name is found in list and returns false otherwise.



FOR EACH child IN morningList

{



}

Which of the following could replace so that the code segment works as intended?
(A)
IF (IsFound (afternoonList, child))

{

APPEND (lunchList, child)

}

(B)
IF (IsFound (lunchList, child))

{

APPEND (afternoonList, child)

}
(C)
IF (IsFound (morningList, child))

{

APPEND (lunchList, child)

}

(D)
IF ((IsFound (morningList, child)) OR

(IsFound (afternoonList, child)))

{

APPEND (lunchList, child)

}

Answers

Answer:

The answer is "Option A".

Explanation:

In this question, the choice "A" is correct because in this a conditional if block statement is used that that use "IsFound" method that takes two parameters "afternoonList and Child" in its parameter and use the append method that takes "lunchList and child" in parameter and add values, that's why other choices are wrong.

What are the uses of various lights? How are they all different? How do you decide on their usage? How can you use natural light to your advantage?

Answers

Answer:

lights

Explanation:

Other Questions
Plz help me thank you Work out and simplify where possible 3/5+7/8 The table shows one student'sresults from spinning the pointer30 times. Complete parts a and b.Spinner FrequencyOutcome 12 3 4 5Frequency 9 5 5 74find the experimental probability and the theoretical probability. HELLP I need this question Since Orthodox Christianity is the major religion in Russia, there are no Islamic mosques in the country.TrueFalse 552.64 round to the nearest whole number SHOW YOUR WORKHow many pictures can you save at one time to the photo stream on your cell phone? Solve the equation you wrote in part a to find the unknown variable. (2 points) A driver younger than 18 years of age may not operate a motor vehicle with any passenger who is not an immediate family member until 6 months from the date that the person's driver's license was issued.O TrueO False Manufacturers use several different production processes to create goods and services.a. Trueb. False Help please lol..forgot how to do this Answer choices 10%30%25%No links no links I will report find the measure for the angle of theta Find the distance between the two points rounding to the nearest tenth (8,7) and (1,-2) What is the volume of this cone? Hint: Find the radius from the given diameter. Evaluate (3.68)2670555 PLZZZZ HELP ASApIf a Bill was made and this Bill helped prevent racism against Asians bc of the pandemic Would the Bill be made into a law? Yes or no? Which of the following options has a distance of 12 city blocks? Select three that apply. Brainliest for correct answer asap please help me asap ill give brainilist Jdjdmkskskksskjdndjdndisndbjd