Question: You are to write a program in which a number is stored in an **IntegerSign** object. You can then ask this object if the number

You are to write a program in which a number is stored in an **IntegerSign** object. You can then ask this object if the number is zero, positive, or negative. The corresponding UML diagram looks like this:

 You are to write a program in which a number is

Hints:

- Zero is considered positive.

- Use if/**else** statements for some of your tests but if you're feeling adventurous you can try the conditional operator

Integer Sign + signedInteger: int IntegerSign(numberToStore: int) isNegative(): boolean is Positive(): boolean isZero(): boolean

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!