Reference no: EM13333588
Use at least the following classes, you are free to define others in the spirit of this scenario:
Party - index, a name, a location, and list of a number of creatures (accessed by links to instances of the Creature class).
Creature - index, a type, a name, party by index, empathy value, fear value, list of treasures, list of artifacts
For example - each class should have some fields in common with it parent class, and some fields not in common with either its parent class, or its sibling classes:
PhysicalCreatures - age, height, weight, carrying capacity
Man
Woman
Sorcerer
Warlock
Witch
MagicalCreatures
Ghoul
Zombie
Sprite
Dragon
Treasure - index, type, creature by index, weight, value
Artifact - index, type, creature by index, other fields
Use the ArrayList class to hold instances of the classes defined in item 1. Be sure to use generics appropriately.
Use a text data file with the following format - which you may extend, and may be extended in the later projects. As a minimum, each item should be specified by a single line in the data file. The initial fields should be used during the instantiation of objects and your program should ignore later fields that are not used. For simplicity, let us assume that the fields are separated by colons. The specifications look something like the following, where the angle brackets are not part of the actual data file. I think we can assume that empathy and fear are integers (perhaps negative), while carrying capacity, weight and value will be doubles.
Specifications for a few classes - you are free to add to this list:
p:<index>:<name>
c:<index>:<type>:<name>:<party>:<empathy>:<fear>:<carrying capacity>
t:<index>:<type>:<creature>:<weight>:<value>
a:<index>:<type>:<creature>
All the classes should be provided with appropriate:
constructors
toString implementations
additional methods
instance variables connecting the class to appropriate instances of other classes
A GUI that will allow the user to do at least the following operations:
Select the data file at run time.
Show the internal data structures in a text area
Search for an item by index, name or type. For example, the creature whose name is "Jane".
The GUI class(es) should be distinct from the other classes in the program.
Name the complex ion present when the compounds dissolved
: Name the complex ion present when the followng compounds are dissolved in water and determine the number of moles of each species present if one mole of the compound is dissolved
|
What is the magnitude of the force of water resistance
: The aircraft carrier John F. Kennedy has mass 7.4 107 kg. When its engines are developing their full power of 280,000 hp, the John F. what is the magnitude of the force of water resistance
|
Determine the change in the medallion fee that maximize
: How much will firm 1 earn if it convinces the mayor to decrease the medallion fee by $40,000 (F = – $40) so that the medallion fee is entirely eliminated?
|
What is the sample standard deviation of the above returns
: Given that Dov Pharmaceuticals was down by 98% for 2006, why did some investors hold the stock. Why didn't they sell out before the price declined so sharply.
|
Use the arraylist class to hold instances of the classes
: Use the ArrayList class to hold instances of the classes defined in item 1. Be sure to use generics appropriately.
|
Determine what is the total float for the month
: Your neighbor goes to the post office once a month and picks up two checks, one for $13,400 and one for $4,400. The larger check takes three days to clear after it is deposited; the smaller one takes two days.
|
Explain an acidic solution when dissolved in water
: Which of the following salts will make an ACIDIC solution when dissolved in water. a. NH4Cl b. Al(NO3)3 c. K2CO3 d. NaF Which of the following salts will make a BASIC solution when dissolved in water. a. NaHS b. Cu(NO3)2 c. KHCO3 d. NaF
|
Explain what concentration of cl- ion in m is required
: The Ksp for AgCl = 1.8x10^-10, @25 degrees Celsius. If the goal is to harvest silver ions from a film stop bath, and the plan is to get the silver ion concentration down to 18x10^-12 M, using NaCl, what concentration of Cl- ion, in M is required
|
What is the final velocity of the other puck
: Consider the collision between two hockey pucks in the figure below. They do not stick together. Their speeds before the collision are v1i = 30 m/s and v2i = 11 m/s. What is the final velocity of the other puck
|