Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please help me with this prompt? - - - Load RatesD INSERT INTO Rates ( min _ wt , max _ wt ,

Can you please help me with this prompt? --- Load RatesD
INSERT INTO Rates (min_wt, max_wt, rate)
Values (0,15,15);
INSERT INTO Rates (min_wt, max_wt, rate)
Values (16,25,20);
INSERT INTO Rates (min_wt, max_wt, rate)
Values (26,45,25);
INSERT INTO Rates (min_wt, max_wt, rate)
Values (46,85,30);
INSERT INTO Rates (min_wt, max_wt, rate)
Values (81,500,40);
--- Load Owners
INSERT INTO Owners (owner_ID, fname, lname, phone, balance)
VALUES (3001, 'Fred', 'Flintstone', '5408311981',100.00);
INSERT INTO Owners (owner_ID, fname, lname, phone, balance)
VALUES (3002, 'George', 'Jetson', '4047758909',225.00);
INSERT INTO Owners (owner_ID, fname, lname, phone, balance)
VALUES (3003, 'Shaggy', 'Rogers', 9197501029,50.00);
INSERT INTO Owners (owner_ID, fname, lname, phone, balance)
VALUES (3004,'
I need to use the MVC design pattern and the singleton pattern for the DataSource and TextIO classes.
I also have to follow the single responsibility
design pattern when designing classes and methods.
I have to keep methods small and easy to read, easy to test, and easy to maintain.
IMPORTANT:
The Java client never accesses a base table directly.
I have to use incremental development and test-driven development. The Assignment is to develop a Java interface that provides the following functionality.
Command Line Interface
-Develop a command line interface (CLI). Each 3
to 4 character command is followed by zero or more
parameters separated by one or more spaces.
For this assignment, implement the following commands:
help display a list of commands available to the user. Only list the commands that are implemented.
quit quit the application.
rtp
Daily Schedule Report:
Display the appointment schedule for the given day.
The report type is schedule. The day is specified with a date
formatted as: DD-MMM-YYYY (e.g.,21-JUN-2023).
The report displays a header row at the top of the report with the name of the report and the date being displayed.
An example report is shown below.
Daily Schedule for June 21,2023
Walker Dog Dog ID Time
Mary Williams Daisy 10512
Mary Williams Max 10214
Bob Anderson Lucy 10414
For each appointment on the given day, display: walker name, dog name, dog ID, and the hour in 24-hour time (e.g., the integer stored in the appointment table).
Sort the rows by time from the earliest appointment(s)
to the latest appointment (s).
The output must be readable. Use tabs between columns on each line.
Running Your Program:
The Controller accepts commands until the user enters quit.
This will be run program from the Unix command line. Test your program from the command line. Do NOT submit any packages. Packages create problems running the code. I
Your program must accept two command line arguments, the username and password for the database. You and your partner should be able to run your program with your
own database. Providing the username and password on the command line makes it easy to run the program with different Oracle accounts.
Input/Output:
Your program may only interact with the user through the TextIO class. The one and only exception is the DataSource class, which may print error messages directly to the
monitor using an SOP statement.
A product quality system would not allow any user interaction
outside of the user interface class. In | appt_no NUMBERwalker_ID NUMBERappt_hour INTEGERCONSTRAINT Appt_PK PRIMARY KEY (appt_no)CONSTRAINT Appt_Walker_FK FOREIGN KEY (walker_ID) REFERENCES Walkers (w put Validation:
Verify that each command has the correct number of arguments. Do not invest time validating the input values. You may assume you have intelligent users who do not make mistakes.
DataSource:
The DataSource class may NOT expose any details of the data storage mechanism. The DataSource will provide one method for each operation. The client will call methods in the DataSource class with simple parameters.The DataSource method that processes the daily schedule report returns an array of strings an acceptable solution to simplify the assignment.
Database Interaction:
The Java interface may NOT directly access any database table
Your program must close the database connection. When the user enters "quit", the program must close the connection. To be safe, the main method should also attempt to close the database connection. Use the Java finally clause to close the database connection if a database operation fails.
Testing:
Submit a simple test driver named TestDrv that executes
at least three test cases for the rpt command. Positive tests generate a report, even if there are no appointments scheduled. Negative test cases handle errors, like a bad date (e.g.,29-Feb-2023). The output for each test cases prints the command and prints pass or fail. For example:
test 1: rtp pass
I have already dw_create VALUES (5001, 'Mary', and dw_load
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

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions

Question

analyze file formats and basic digital design rules.

Answered: 1 week ago