Question: Write a stored procedure to add a dog. Pass 5 parameter values: owner s ID , date of birth, name, breed, and weight. Use a

Write a stored procedure to add a dog. Pass 5 parameter values: owners ID, date of birth, name, breed, and weight. Use a sequence to generate an ID for the dog being added.
Write a stored procedure to add an owner. Pass four parameter values: first name, last name, phone, and starting balance. Use a sequence to generate an ID for the owner being added.
Write a stored procedure to add a walker. Pass five parameter values: first name, last name, phone, balance, and commission rate (the % of an appointment charge that goes to this walker).
The procedure will set the walkers status to active. Use a sequence to generate an ID for the walker being added.
Extend the Java client to support the 3 commands described below. The commands are simplified to minimize development time and effort. The Java interface will not provide any functionality to look up IDs. Users know dog, owner, and walker IDs. some parameters will be entered using name:value pairs to increase usability and flexibility.
Add a command to the Java user interface enabling a customer to give a walker a tip. Implement all functionality in Java. Handle all expected exceptions and display a meaningful error message for each failure.
The name of the command is tip. The command takes three parameters: the ID of the walker to be tipped, the ID of the owner giving the tip, and the amount of the tip. The command below gives walker 5001 a tip of five dollars and fifty cents from owner 3005.
tip 5001 owner:3005 tip:5.50
Add a command to the Java user interface enabling a customer to add a dog. The user interface must use the stored procedure to add the dog. the name of the command is add. The first parameter is dog specifying the user wants to add a dog. The add command will enable users to add other entities, including owners and walkers. For this assignment, you will only implement the command to add a dog.
Five additional parameters are passed with the following names: owner, dob, name, breed, and wt. Specifying the parameters with name:value pairs enables the parameters to be passed in any order. The command below adds a dog named Tramp, a mixed breed, born on March 12,1995, weighing 22 pounds, owned by owner ID 705.
add dog name:Tramp dob:12-Mar-1955 breed:mixed wt:22 owner_ID:705
Add a command to the Java user interface enabling a customer to adjust the weight of their dog.
Implement all functionality in Java. The name of the command is upd. The first parameter is wt followed by 2 parameters with names: dog_ID and wt.
The command below changes Dinos weight to 83 pounds.
upd wt dog_ID:101 wt:83
Important Requirements
Isolate code that parses the commands and parameters. Write simple, reusable functions w/ a single responsibility. Test functions that process commands, but are not required to automate tests to process commands. The Java client never directly accesses a base table. create all objects, including sequences and views, in the dw_create script. may extend the scripts you are given, but may not change any code in the given scripts. Customers frequently tip their walker, but dogs are rarely added to the system. Use the appropriate JDBC statements. Inserts, updates, and deletes only occur in a transaction. All transactions must end with a commit or rollback.
Develop a PL/SQL test driver to test your stored procedures and develop a Java test driver to test the user interface.
Each test case must be independent. may be tempted to develop a test case that depends on a previous test case. Creating a dependency should raise a red flag. Developing test cases that depend on previous test cases minimizes development time but creates challenges when a single test case must be executed to troubleshoot a problem.
Each test case has three sections: setup, test, clean-up. The setup section resets all objects used by the test. For example, the test should start with an empty schema, load static data as necessary, and reset sequences. The state of the database must be known before the test is executed.
The test section executes the test case, verifies the results, and determines if the test case passed or failed.
The clean-up section reverses the setup and the test execution. For example, the clean-up section might truncate all tables. Do not duplicate code. The setup and clean-up sections may call functions and procedures (e.g., truncate tables).
Each test case should output a unique numeric test case number and either PASS or FAIL. A high quality test driver would also produce a report summarizing the number of test cases that passed, the number that failed, and the ID of each test case that failed. Keep test driver simple. Think about dependencies and avoid. For example, resetsequences to ensure that ID numbers are consistent across multi. executions of test drv. code below
 Write a stored procedure to add a dog. Pass 5 parameter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!