This is the PPL Assignment, by Prof. Rahul Kala.
This repository contains the questions 1 - 10 of the assignment, along with the randomly generated data for input.
Windows 10 Pro (x64)
JAVA 8 (jdk 1.8 Update 92) 64 bit
Notepad++, javadoc, BlueJAll the documentation files are present in the folder doc.
Open the file
package-summary.htmlThis is the index file of the documentation of all the files in the assignment.
I'm providing a simple shell script file to ease the task of compilation and generation of random code.
tested on Zorin OS 12 Core (Ubuntu Based) (x64)Use the command
sh compiler_java.shon the terminal.
After this you just need to change the directory using
cd bytecodes/and type
java q$_assignto execute whichever question you want to.
- Keep all the Java source files as well as the input files in the same directory.
- first of all we need to generate the random input for the programs
- take all the files from the Input folder and put them where the java programs are kept.
- run the command
javac *.java
to compile all the files. - If you wish to generate random input once again, type in
java rand_data_boys
java rand_data_girls
java rand_gift_data
- now, run the program of whichever question you need to see the result.
- run the command
java q$_assign
where, $ = question number. - all the inputs and output files are given in the folder Input & Output respectively.
- All the outputs generated will be in the same folder
I've used simple text files to read the input from, as well as storing the output to.
Output of
- Question 1 is stored in Couples.txt
- Question 2 is stored in Gift_log.txt
- Question 4 is stored in Broken_up.txt and New_couples.txt
- Question 5 is stored in Couples_Q5.txt
- Question 6 is stored in Q6_Breakups.txt
- Question 7 is stored in Q7_analysis.txt
- Question 10 is stored in Q10_Random_Ans.txt
- Question 2 has been modified to NOT to take any kind of inputs from the terminal
- Codes for Question 4, Question 5, Question 6, Question 7 have been added to the repository.
- Question 10, which demands the creation of a data structure, has been added to the repository.
- Also, added all the auxilary classes needed for my programs.