Activity 5.3 - Completing the coding of the LinkingInfo class

Topic

This activity uses the ArrayList class.

Materials

In addition to the Solution document, the project for this activity contains three classes:

Task

An instance of LinkingInfo contains the name of a computer on a local network, together with the names of all the computers to which it is linked. The names of the linked computers are held in an ArrayList instance.

The class has the following methods:

The methods for adding and removing names are incomplete. Your job is to write these methods as specified above.

Instructions

Open LinkingInfo and complete the methods addComputer and removeComputer in the places indicated.

Run the project, and check that the output is as you expected