Question: Tasks: Write Java or Python programs to answer the following questions using the database that you created in Project Part 1 . Please put all
Tasks:
Write Java or Python programs to answer the following questions using the database that you created in
Project Part
Please put all the code into one source file one java file or one python file
Language version
o Clearly denote your Java or Python version.
o Java version should be or above.
o Python version should be Python or above.
You can hardcode the database connection parameters host name, user id database name, and
the database connection password in your program, or put them in a configuration file.
Your program should contain a main function
o The main function should have question # as the first parameter.
o The main function should also have other necessary parameters to answer individual
questions.
points Create a README.txt to write down the work allocation of the different team members.
In this file, also write down the full name of the team representative who submit the team project.
points Each team member needs to create a PeerEvaluationtxt to include a
peer evaluation to your team members for this part of the project. Your peer evaluation should
include a score to with being poorest and being best and a justification for your score.
The justification does not need to be long.
Note:
If your program cannot be compiled correctly, or cannot be run correctly, this part of your project
will be graded as ZERO even though your SQL can be run correctly through the interactive
interface of any DBMS
points The correctness of the program compiling taking parameters, connecting to
databases, etc. counts for points.
o For the database connection, please use hostname localhost database name
cs username dbuser and password Iwilldowell Your TA will create a
database with the given name, create a user with the given username password in their
MySQL database server, and have all the tables to test your program.
points Each of the following questions counts for points.
Queries:
points Find the sites that are on a given street ie the address contains the street name
case insensitive Show the detailed information of each site. To get the answer to this question,
the command to run is
proj for Java
python proj.py for Python
points Find the digital displays with a given scheduler system. Show their serial nos, model
nos, and the names of technical supports who specialize their models. The scheduler system
should be a parameter input through the main program. To get the answer to this question, the
command to run is
proj for Java
python proj.py for Python
points List the distinct names of all salesmen and the number of salesmen with that name.
The output should be in the ascending order of the salesmen name. If multiple salesmen have the
same name, show all the attribute values for those salesmen. For instance, if the Salesman
relation contains the following records
PeterM Mary, FJohnM Mary, F
The output should be:
Name cnt
John
Mary Mary,FMary,F
Peter
To get the answer of this question, the command to run is
proj for Java
python proj.py for python
points Find the clients with a given phone no The phone no should be a parameter input
through the main program. To get the answer to this question, the command to run is
proj for Java
python proj.py for Python
points Find the total working hours of each administrator. Display the administrators
employee ids, names, and total working hours in ascending order of the total working hours. To
get the answer to this question, the command to run is
proj for Java
python proj.py for Python
points Find the technical supports that specialize a specified model. Display the names of
those technical supports. The specified model no should be a parameter input through the main
program. To get the answer to this question, the command to run is
proj for Java
python proj.py for Python
points Order the salesmen with descending order of their average commission rates. Display
each salesmans name and the average commission rate. To get the answer of this question, the
command to run is
proj for Java
python proj.py for Python
points Calculate the number of administrators, salesmen, and technical supports. Display the
results in the following format.
Role cnt
Administrator
Salesmen
Technicians
To get the answer to this question, the command to run is
proj for Java
python proj.py for Python
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
