S31_requestinheritance_medium - agarmstrong21/agarmstrong_swd_2019 GitHub Wiki
Prompt:
YOUR COMPUTER HAS CRASHED AND YOU HAVE LOST YOUR REQUEST INHERITANCE HIERARCHY!!!!!!!
All that remains of this catastrophe is your Server class, a DataGenerator class and some old output.
Back in the pre-crash days, your server would take in a variety of requests and print diagnostic information about each request.
Your mission, should you choose to accept, would be to reverse engineer an inheritance hierarchy that will model different kinds of requests with minimal code repetition.
This problem is of medium difficultly and would be a wonderful addition to your oral exam portfolio!
Good Luck!
Files:
This program inherits many different classes to process different processes. Running the Server class, Server creates a stack of different processes and prints them all out. Server uses DataGenerator create the inputs for the stack. Server will print out everything that is in the example_output.txt file.
Server is the main class. Server calls DataGenerator to create data based on the other classes. File, Video, Payment, and Form are data variable classes that stores private data from other classes. Request is the Super Class of PostRequest, GetRequest, and GetVideoRequest. GetRequest is the Super of GetFileRequest. Post Request is the Super of PostFormRequest and PostPaymentRequest, which respectively are the supers of PostEncryptedFormRequest and PostEncryptedPamentRequest. Server prints out all data created that is parallel to the example_output.txt file. Each Class has a counter that keeps count of how many times it is use. This prints out in the example-output.txt file.
The java documents are served from a local web server on this machine. To start the web server, navigate to the directory immediately above where the source code is checked out (i.e. ~/git ) and then use "python -m SimpleHTTPServer" in that directory.
cd ~/git
python -m SimpleHTTPServer&
```
Note: if you are running python 3 (which you can check via opening a terminal and typing: python --version), then the command is:
```shell
python3 -m http.server
```
[JavaDocs for Request Inheritance](http://localhost:8000/agarmstrong_swd/oral_exam1/S31_RequestInheritance_Medium/doc/RequestInheritance/package-summary.html)
# Source Code
[Source Code for Request Inheritance](https://class-git.engineering.uiowa.edu/swd2019/agarmstrong_swd/blob/master/oral_exam1/S31_RequestInheritance_Medium/)