Three Small Programs #1 A veterinary office wants to produce information sheets on the pets it treats. Data includes diet, whether it is nocturnal or not, whether its bite is poisonous (e.g., snakes), whether it flies, and so on. Use a superclass Pet with abstract methods and create appropriate subclasses to support about 10 animals of your choice. #2 Create a pricing system for a computer company that sells personal computers over the Internet. There are two kinds of computers, laptops and desktop computers. Each computer has a processor (0.8, 1, 1.2, or 1.5 gigahertz), memory (128, 256, 394, or 512 MB), hard drive (20, 40, or 60 gigabytes), CD drive (CD-ROM, CD-RW, or DVD). Laptops have 14- or 15-inch screens. Desktops have 15-, 17-, or 19- inch monitors. Options are modem, a network card, and a zip drive. You should have an abstract class Computer and subclasses DeskTop and LapTop. Each subclass should have methods for calculating the price of a computer given the base price plus the cost of the different options. YOu should have methods for calculating memory price, hard drive price, and so on. There should be a method to calculate shipping cost. #3 Write a banking program that simulates the operation of your local bank. You should declare the following collections of classes: Class Account Data fields: customer(type Customer), balance, accountNumber, transactions array (type Transaction) Methods: getBalance(), getCustomer(), toString(), setCustomer(), setBalance(), toString() Class SavingsAccount extends Account Methods: deposit(), withdraw(), addInterest() Class CheckingAccount extends Account Methods: withdraw(), deposit(), addInterest() Class Customer Data fields: name, address, age, telephoneNumber, customerNumber Methods: accessors and mutators for data fields Class Senior, Adult, Student, all these classes extend Customer Each has constant data fields - SAVINGS_INTEREST, CHECK_INTEREST, CHECK_CHARGE, and OVERDRAFT_PENALTY - that define these values for customers of that type. Class Bank Data fields: accoutnts array (type Account) Methods: addAccount(), makeDeposit(), makeWithdrawal(), getAccount() Class Transaction Data fields: customerNumber, transactionType, amount, fees (a string describing unusual fees) Methods: processTran() Write an application class that interacts with the user that opens several accounts then performs several interactions.
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Please include design documentation and method descriptions. Complete copyrights to all work purchased.
Java 2 SDK 1.4 on Windows 2000.