compare the CORBA implementation with the corresponding RMI implementation (referring to Method 1 from the preceding chapter, rather than Method 2).

This exercise is a fairly lengthy one that implements the bank example from the

 

preceding chapter and should allow you to compare the CORBA

implementation with the corresponding RMI implementation (referring to

Method 1 from the preceding chapter, rather than Method 2). The IDL code for

this application is supplied and is shown below. Note, in particular, that there is

no direct equivalent of the Vector class in IDL, so a new type has been created

via typedef:

typedef sequence BankAccts;

Thus, a BankAccts object is effectively an array of Account objects that is of

indeterminate size.

In implementing the server, you should follow the advice given below.

• Create an AccountFactoryServant object and a

BankFactoryServant object, but do not register these with the

ORB, since clients will not need to use them.

• Declare and initialise three parallel arrays to hold the data for

bank customers (surnames, first names and balances).

• Create an array of Account objects and use the createAccount

method of the AccountFactoryServant object to create the

members of this array, employing the data from the above three

arrays in the construction of these members.

• Create a BankServant object, passing the above array to the

constructor for this object, and register the object with the ORB.

In implementing the client, you should follow the advice given below.

• Use the above BankServant object to create a Bank reference.

• Retrieve the BankAccts attribute of this Bank reference (as an

array of Account objects). Use the methods of class Account to display the contents of

these Account objects

module BankApp

{

interface Account

{

readonly attribute long acctNum;

attribute string surname;

readonly attribute string firstNames;

attribute double balance;

string getName();

double withdraw(in double amount);

void deposit(in double amount);

};

interface AccountFactory

{

Account createAccount(in long newAcctNum,

in string newSurname,

in string newFirstNames,

in double newBalance);

};

typedef sequence BankAccts;

interface Bank

{

attribute BankAccts accounts;

};

interface BankFactory

{

Bank createBank(in BankAccts newAccounts);

};

};

find the cost of your paper

prepare a lead container of mass 1.5 kg and pour 0.65 kg of water into it, both at the room temperature of 20.5°C.

You are at a restaurant eating lunch with a friend. After the meal, your friend realizes they left their wallet at home. Your friend gives you a piece of silver….

Given the above information, how many people did McKinsey and BCG hire in the year 2013?

There are two big consulting firms in Melbourne, McKinsey and Boston Consulting Group (BCG); assume that their clients view them as providing identical consulting services. They hire people on yearly….

write a program that reads a file and displays all of the words in it that are misspelled.

A spell checker can be a helpful tool for people who struggle to spell words correctly. In this exercise, you will write a program that reads a file and displays….