Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Some service fees (% of asset amount) of two investment companies are shown in the following tables: Company A: Service Fee Type Fee Management Fee

Some service fees (% of asset amount) of two investment companies are shown in the following tables:

Company A:

Service Fee Type

Fee

Management Fee

1.5

Subscription Fee

5.0

Redemption Fee

1.0

Company B:

Service Fee Type

Fee

Platform Fee

0.2

Management Fee

1.0

Subscription Fee

2.0

The above information is to be stored in two maps (Map) referenced by companyA and companyB for Company A and Company B respectively. The service fee type is assumed to be unique in each map and it is the key of it.

  1. Write a program segment to store the above information of Company A in a map companyA. Remember to create it first.

  1. Assume that there are many entries in the map referenced by companyA. Using an enhanced for loop and an array, write a program segment to store the number of service fee types in each fee category using an element of the array. The fee categories are "fee <= 0.5", "0.5 < fee <= 1.0", and "fee > 1.0".

  1. Assume there are many entries in the maps and one company can have some service fee types not available in the other company. Write a program segment with an enhanced for loop to print out the name of each service fee available in both of the companies (A and

B) and its lowest fee. For example, the string "Subscription Fee, 2.0" is printed when we are considering "Subscription Fee".

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions