Suppose you are working on an object-oriented module for the sale and purchase of sacrificial animals. Major Classes are Seller, Dealer, Animal, Buyer, and Invoice. Details of the classes can be seen...


Suppose you are working on an object-oriented module for the sale and purchase of
sacrificial animals. Major Classes are Seller, Dealer, Animal, Buyer, and Invoice. Details of the classes
can be seen in Table 1. Note that the system does not store information about individual person, apart from
the Seller, dealer, or a buyer. Write Java code for the class declaration, instance variables, and constructors
for all the classes. Use inheritance and composition where required. You can create new class(es) if needed,
with explanation in comments.


Question 1: Suppose you are working on an object-oriented module for the sale and purchase of<br>sacrificial animals. Major Classes are Seller, Dealer, Animal, Buyer, and Invoice. Details of the classes<br>can be seen in Table 1. Note that the system does not store information about individual person, apart from<br>the Seller, dealer, or a buyer. Write Java code for the class declaration, instance variables, and constructors<br>for all the classes. Use inheritance and composition where required. You can create new class(es) if needed,<br>with explanation in comments.<br>Table1:<br>Attributes<br>Type (Cow, Goat, Lamb etc), a unique identification tag, color, weight, price per kg, the<br>date of arrival of the Animal to the dealership, service charges, and whether the Animal is<br>sold or not.<br>dealer's name, dealer's id, dealer's address, the dealer's phone number, and the commission<br>rate. The dealer object also keeps track of the Animals that the dealer has. It includes a<br>method that calculates the earning of the dealer<br>Seller's name, id, address, contact, profit rate and sales tax rate. Includes methods to<br>calculate the sales tax on the profit and after tax profit of the seller<br>Name, id, address, contact. Includes a method to calculate the amount the buyer has to pay<br>Class<br>Animal<br>Dealer<br>Seller<br>Buyer<br>

Extracted text: Question 1: Suppose you are working on an object-oriented module for the sale and purchase of sacrificial animals. Major Classes are Seller, Dealer, Animal, Buyer, and Invoice. Details of the classes can be seen in Table 1. Note that the system does not store information about individual person, apart from the Seller, dealer, or a buyer. Write Java code for the class declaration, instance variables, and constructors for all the classes. Use inheritance and composition where required. You can create new class(es) if needed, with explanation in comments. Table1: Attributes Type (Cow, Goat, Lamb etc), a unique identification tag, color, weight, price per kg, the date of arrival of the Animal to the dealership, service charges, and whether the Animal is sold or not. dealer's name, dealer's id, dealer's address, the dealer's phone number, and the commission rate. The dealer object also keeps track of the Animals that the dealer has. It includes a method that calculates the earning of the dealer Seller's name, id, address, contact, profit rate and sales tax rate. Includes methods to calculate the sales tax on the profit and after tax profit of the seller Name, id, address, contact. Includes a method to calculate the amount the buyer has to pay Class Animal Dealer Seller Buyer
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here