Joe Solis

Greenhorn
+ Follow
since Jun 17, 2010
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 Joe Solis

I am working on a project uses a MAP of Insureds, which contains a SET of Coverages, which in turn contains a SET of Products. Inside Class: Coverage, there is a METHOD called: totalProductCost that iterates through the SET of products and accumulates the cost of the products for each coverage.

What I am trying to do in a Class called "CoverageReport" is to "Drill-down" into Class: Coverage to get at this Method for reporting.

In the Java class I'm taking, we learned how to access collection data on a single level, but not how to "drill-down" into multiple levels.


Thanks.

13 years ago
I am working on a project uses a MAP of Insureds, which contains a SET of Coverages, which in turn contains a SET of Products. Inside Class: Coverage, there is a METHOD called: totalProductCost that iterates through the SET of products and accumulates the cost of the products for each coverage.

What I am trying to do in a Class called "CoverageReport" is to "Drill-down" into Class: Coverage to get at this Method for reporting.

In the Java class I'm taking, we learned how to access collection data on a single level, but not how to "drill-down" into multiple levels.


Thanks.

13 years ago
Continuing with this project, I am now trying to get information from a Class called Coverage.

As I mentioned earlier, this project uses a MAP of Insureds, which contains a SET of Coverages, which in turn contains a SET of Products. Inside Class: Coverage, there is a METHOD called: totalProductCost that iterates through the SET of products and accumulates the cost of the products for each coverage.

What I am trying to do in a Class called "CoverageReport" is to "Drill-down" into Class: Coverage to get at this Method.

In the Java class I'm taking, we learned how to access collection data on a single level, but not how to "drill-down" into multiple levels.


Thanks.


13 years ago
I'm trying to iterate through a MAP that is in a different class than the one I'm doing the iterating in.

In class: Company, I have defined a Map:

private Map<String, Insured> insureds = new HashMap<String, Insured>();

This is a MAP of Insureds that in turn contains as SET of Coverages that in turn contains a SET of Products.

In class: CoverageReport, I am using this statement to try to iterate through the Insured MAP to get information of the Insureds, their Coverages and in turn their Products:

for(Map.Entry<String, Insured> entry : insureds.entrySet()) {
Insured insureds = entry.getValue();
InsRpt.append(entry.toString()).append("\n");
InsRpt.append("Coverage: ");


the interpreter is telling me that the variable: insureds cannot be resolved.

Can anyone tell me what I'm doing wrong?

13 years ago