Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //to create an instance of the general object Item
- Item item(itemID, itemName, itemWeight, itemDescription)
- //to create an instance of the sub-object Weapon
- Weapon weapon(itemID,itemName, itemWeight, itemDescription, weaponDmg, weaponDura, weaponAcc, weaponEnchant) extends Item
- //this same style works for armour and all kinds of other stuff HWOEVER it helps in the long run in terms of sorting as all items created
- //using the 'Weapon' can be found using a query for the class 'Weapon' while using 'Item' would return every item as well as all sub-object types
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement