(Gaming) Your company is working on a game that includes a character, Sammie, whose name changes each time the character finds or loses a gem. When Sammie finds an opal and then finds a ruby, for...


(Gaming) Your company is working on a game that includes a character, Sammie, whose name changes each time the character finds or loses a gem. When Sammie finds an opal and then finds a ruby, for example, its name changes first to SammieOpal and then to SammieOpalRuby. If SammieOpalRuby loses the opal, its name changes to SammieRuby. The gems used in the game are opal, ruby, emerald, onyx, sapphire, jade, and peridot. Implement a class Sammi Name that uses a linked chain to represent Sammie’s name. The class should provide methods for appending a gem to the name, removing a gem from the name, and returning the current name as a string.



Dec 15, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here