Question: CODE MUST BE IN JAVA Details: Your java program will be provided with a file called input.txt which describes an instance of STA - blemarriage.
CODE MUST BE IN JAVA
Details: Your java program will be provided with a file called input.txt which describes an instance of STA
blemarriage. To be more specific, the first line will be a single integer the number of menwomen the
next lines will give the preference lists of the men ie each line will be a permutation of dots,
and the final lines will give the preference lists of the women.
You must write a java program which will read in the input from the file input.txt which will be placed
in the same directory as your java program find the matching on men and women that occurs if
ProposeDispose and SadieHawkins are both run on one copy of the given input, output the number of
men who get a different partner than their clone, output the number of women who get a different partner
than their clone, and determine whether the combined matching on the N men and women is stable.
Picky, but required specifications: Your project must:
be submitted via canvas.
consist of or more dotjava files no class files, zip files, input files, or other files should be submit
ted
have each file begin with a comment containing your name and the project number.
not be placed into any package.
have one file called Projectjava dont be concerned if canvas adds a 'flag' dots for repeated
submissions
compile with the command 'javac Project java'.
run using the command 'java Project l
accept input from a file called input.txt in the same directory as the java files formatted precisely
as described above.
accomplishes the goal of the project. In other words, the output should be the correct answer
formatted correctly.
be submitted on time early and multiple times is fine
For each listed item you fail to follow, expect to lose at least points. However, submitting via email will
guarantee you a zero.
Examples: Your program should work on any valid input and not just on the following examples. In
particular, I am very likely to test it on much larger inputs eg or even While working
on the code you may want to print out extraneous information to help you debug. but delete such output
before your final submission. There are multiple possible ways to solve the problem. Any reasonable,
polynomial time method is permitted.
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
