Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
North Carolina State University –  
Project Proposal 1 (First Project) 
Refactoring Evaluation of SQL Queries (Java/Junit) 
Spring 2022 
 
Project Tasks 
The SQLFE (SQL File Evaluation) open source software system automatically grades a set of files 
containing SQL queries. This project focuses on redesigning and rewriting one large method 
that controls all of the backend processing, and developing JUnit tests for the above method.  
1. Restructure and/or rewrite the evaluate() method in the BackEnd.java class, adding any new 
sub-methods desired, to accurately and efficiently do the following tasks: 
a. Read in and correctly parse the instructor-generated assignmentProperties file that 
specifies the correct solutions for each SQL query question. 
b. Set up the grade summary file for total scores and individual query scores for each 
submission file. 
c. Read in all submitted SQL query files from the files folder underneath the main 
evaluation work folder. 
d. Process each submitted SQL query file, which includes parsing each file as it is read 
in and evaluating each file through testing it using specified tests from the 
assignmentProperties file. 
e. Write out the score information for each file to the grade summary file. 
2. Related to this task, a second and associated task for the project is to generate JUnit tests 
for the evaluate method in the BackEnd class, in order to show that this method works 
correctly.  A high percentage of code coverage is desired. 
3. You may continue to use, as is, any of the utility methods in the Utilities.java class.  
However, know that these methods are used by other classes in the project.  If you prefer to 
create new utility methods (including making modifications to existing utility methods), any 
new or modified methods should be given new method names if they remain in the 
Utilities.java class file.  In other words, do not modify or remove any method in 
Utiilties.java. 
4. Generally, you should decide where to place sub-methods you create as part of the new 
evaluate() method functionality (that is, you may place them in BackEnd.java or 
Utilities.java as you think is best for your design).  
5. Good functionality is the primary goal.  Any new code must work at least as well as the code 
that you’re replacing. 
6. Good code commenting is expected.  As a former consultant at 3M for a number of years, 
I’ve seen that the importance of good code commenting in helping me maintain or add to 
other people’s code cannot be overstated. 
7. We are also interested in any constructive suggestions for improving the BackEnd class 
overall.  If you find issues or possible improvements in working on this project, please 
communicate them to Paul Wagner (see contact information below). 
 
Additional Project Details 
While there are many possible improvements to SQLFE, we want to focus on the BackEnd class, 
specifically the evaluate() method within that class. As this method is essentially the main 
controller for the system, it has no parameters.  The evaluate() method has been expanded in 
functionality over time and is currently ~175 lines in length, so there is a significant need to 
restructure this method into multiple methods to give it better design and make it more 
maintainable. 
 
System Overview 
SQLFE is an open source software tool to assist computer science instructors by automatically 
grading assignments or tests involving multiple submitted files consisting of SQL queries added 
to a template submission file.  SQLFE has a JavaFX GUI that communicates with the backend 
system.  Developed by Paul Wagner and others at the University of Wisconsin – Eau Claire, 
SQLFE allows instructors to specify a weighted set of tests for each assignment question, which 
are then used to evaluate a submitted query and/or compare that submitted query against an 
instructor-supplied solution query.  SQLFE also generates a detailed output file for each 
submission, which can be returned as feedback.  SQLFE reduces instructor grading time for SQL 
queries and allows quicker, more detailed feedback as compared to hand grading.  SQLFE 
source code, sample submission and instructor-generated files, and documentation can be 
found at https://github.com/wagnerpj42/SQL-File-Evaluation .  SQLFE itself is written entirely in 
Java, with the unit tests written in JUnit.  Since SQLFE executes SQL queries as part of its 
evaluation, it must generally be connected to an SQL database management system (DBMS).   
Currently Oracle and MySQL DBMSs (both 5.x and 8.0) are supported. 
 
Files for Focus 
The following list of files to focus on is provided as a starting point for understanding.  To 
ensure understanding of overall system functionality we suggest downloading the entire SQLFE 
project and getting the project working in your environment, including connecting it to an 
Oracle or MySQL DBMS, if this is possible.  It is also possible to run SQLFE with a very simple 
“mock” database instance, which just returns one hard-coded data set at this point, but could 
be expanded to add better functionality in the future.  However, to understand the major areas 
where you will be working, you can look at the following files in the GitHub repository: 
1. MOST IMPORTANT: /src/sqlfe/general/BackEnd.java – the class where the general system 
back-end work is performed, including the evaluate() method that needs refactoring 
2. /src/sqlfe/util/Utilities.java, which includes some methods that are called from the 
evaluate() method in BackEnd.java 
3. assignmentProperties – the instructor-specified evaluation file that guides the evaluation 
process. 
4. /files/lt_01.sql, a sample student submission file to be evaluated 
5. /evaluations/AAA_grade_summary.out, showing the summary output from evaluating all of 
the submitted files in the files folder. 
A walk-through of the entire system will be given at our first meeting. 
You will be able to make your own copy of the system in which to do your work. 
 
Questions? 
Paul Wagner, Professor Emeritus of Computer Science, University of Wisconsin – Eau Claire 
Email: wagnerpj@uwec.edu 
(video chat and other communication available by appointment as needed)