Santiago Ennis

Greenhorn
+ Follow
since Nov 05, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Santiago Ennis

Ankit Garg wrote:
So you mean when a Class implements an Interface, there's no inheritance??



Oh! yeah! C implements I, is an example of both - inheritance AND is-a.

What about option C?

- SE

Nidhi Sar wrote:When considering relationships between classes, which statement(s) are true?

A) is-a relationships always rely on inheritance
B) is-a relationships always rely on instance variables
C) is-a relationships always require atleast two class types
D) is-a relationships always rely on polymorphism
E) is-a relationships are always tightly coupled


The answers are A, C & D.



I think answer is D only.

A) is-a relationships *always* rely on inheritance
Always? Actually, is-a relationship rely on Interfaces also (which is NOT inheritance).
For example, C implements I i.e. C is-an I. Where is inheritance in this example?

C) is-a relationships *always* require at least two class types
Always? Actually, "two class type" is NOT a mandatory requirement.
For example, C implements I i.e. C is-an I. In this example there is only one class and it is an example of is-a relationship.

Am I sleeping?

- SE
Develop a regex pattern that does ALL of the following things:

1. It accepts all integers, including positive and negative. So the pattern accepts 2, 3, +6, -1 etc.

In addition to this, there is a restriction on number of digits of the specified integer:- the specified integer should have at least one digit, after + OR - sign, and at most 9 digits after + OR - sign.

+ or - sign is optional. So, +4, -9, etc. are valid inputs. However, only + or - sign is NOT allowed. So, +, - are invalid inputs.

2. It accepts all floats, including positive and negative. So the pattern accepts 2.3, 3.0, +6.9, -1.7 etc.

In addition to this, there is a restriction on number of digits of the specified float:- the specified float should be in 10.2 format
(at most 10 digits before point, and at most 2 digits after point).

+ or - sign is optional. So, +4.23, -9.18, 1234567890.34 etc. are valid inputs.
But 34.456 is invalid because there are three digits after input.
Only + or - sign is NOT allowed. So, +, - are invalid inputs.

Guys, will this work? [-+]?[0-9]{0,9}\.?[0-9]{0,2}

- SE

Minhaj kaimkhani wrote:change it to




-Minhaj



Really stupid question by me.

Anyways, thanks.
Zone.java

TestState.java

Compilation Error:
cannot find symbol symbol : constructor City(java.lang.String,constant.clazz.State.City.StateZone)
location: class constant.clazz.City
City baroda = new City("Baroda", State.City.StateZone.NORTH);
1 error

Why is there a compile-time error? How do I resolve it?

- SE
If either nominator or denominator is float-zero i.e. 0.0, the result is NaN. If both are float-zeros, result is NaN.

If both nominator and denominator are integers and denominator is Zero, result is Exception.

Check this:


Prints:
NaN
NaN
Arth Exp
Arth Exp

- SE
Okayz!

Can you please pass a good weblink that describes the concept of Interface Member Types? I mean "Class within Interface" and "Interface within Interface".

- SE
Does 310-065 test us on the concept of member interfaces (interfaces enclosed within a class or another interface)?

More questions on interface are coming pretty soon!

- SE
Here, the concrete class Rottweiler does not need to implement makeASound(), as it was already implemented by its direct superclass Dog. But it is mandatory for Rottweiler class to implement command() method.




My first post, btw.


- SE