Answered step by step
Verified Expert Solution
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 minwt maxwt rate
Values ;
INSERT INTO Rates minwt maxwt rate
Values ;
INSERT INTO Rates minwt maxwt rate
Values ;
INSERT INTO Rates minwt maxwt rate
Values ;
INSERT INTO Rates minwt maxwt rate
Values ;
Load Owners
INSERT INTO Owners ownerID fname, lname phone, balance
VALUES 'Fred', 'Flintstone', ;
INSERT INTO Owners ownerID fname, lname phone, balance
VALUES 'George', 'Jetson', ;
INSERT INTO Owners ownerID fname, lname phone, balance
VALUES 'Shaggy', 'Rogers', ;
INSERT INTO Owners ownerID fname, lname phone, balance
VALUES
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 testdriven development. The Assignment is to develop a Java interface that provides the following functionality.
Command Line Interface
Develop a command line interface CLI Each
to 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: DDMMMYYYY egJUN
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
Walker Dog Dog ID Time
Mary Williams Daisy
Mary Williams Max
Bob Anderson Lucy
For each appointment on the given day, display: walker name, dog name, dog ID and the hour in hour time eg the integer stored in the appointment table
Sort the rows by time from the earliest appointments
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.
InputOutput:
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 apptno NUMBERwalkerID NUMBERappthour INTEGERCONSTRAINT ApptPK PRIMARY KEY apptnoCONSTRAINT ApptWalkerFK FOREIGN KEY walkerID 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 egFeb The output for each test cases prints the command and prints pass or fail. For example:
test : rtp pass
I have already dwcreate VALUES 'Mary', and dwload
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started