Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you please help me complete this al Add Dog: Write a stored procedure to add a dog. Pass 5 parameter values: owner s ID

can you please help me complete this al
Add Dog:
Write a stored procedure to add a dog. Pass 5parameter values: owners ID,date of birth, name, breed, and weight. Use a sequence to generate an ID for the dog being added.
Add Owner :
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.
Add Walker:
Write a stored procedure to add a walker. Pass five parameter values: first name, last name, phone, balance, and commission rate (the percentage 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 3commands 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.
Tip Walker:
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 5001a tip of five dollars and fifty cents from owner 3005.
tip 5001owner:3005tip:5.50
Add Dog:
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 22pounds, owned by owner ID 705.
add dog name:Tramp dob:12-Mar-1955breed:mixed wt:22owner_ID:705
Update Dog Weight:
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 two parameters with names: dog_ID and wt.
The command below changes Dinos weight to 83pounds.
upd wt dog_ID:101 wt:83
Important Requirements:
Isolate the code that parses the commands and parameters. Write simple, reusable functions with 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. You may extend the scripts you are given, but you 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.
Testing:
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. You 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 ex, 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 num of test cases that passed, the num that failed, and the ID of each test case that failed.
Keep test driver simple, but effective. Think ab dependencies and avoid them. For ex, resetsequences to ensure ID numbers are consistent across multi. exec of test drv. pls look at pictures.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

Identify ways that country culture influences global business.

Answered: 1 week ago

Question

Define human resource ethics.

Answered: 1 week ago

Question

Describe the human resource management profession.

Answered: 1 week ago