Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Identifying properties of relations Write a program that will determine if a relation satisfies the following properties: Reflexive Antireflexive Symmetric Antisymmetric Input Your program

image

Identifying properties of relations Write a program that will determine if a relation satisfies the following properties: Reflexive Antireflexive Symmetric Antisymmetric Input Your program should take as input the 0-1 matrix representation of a relation. Assume that the relation is on a set of 10 elements. So, your program should read a 10*10 boolean matiix from a file. Code Your program should determine if the input relation satisfies any or all of the above properties. It should accept a *.txt file as input. It should check individually for the existence or violation of each property. Your program should adhere to the following programming guidelines: Use proper naming conventions, such as upper case for constants, lower case for variables, and title case for classes. Use proper formatting, such as tabs, spaces, line breaks, and curly braces. Display good documentation, such as, a header block for each file and and inline comments, as needed. Display good design, such as, decomposition of tasks and modular code. Should be no more complex than necessary, for example, if a task can be accomplished by a single loop, it should not be programmed with a 3-way nested loop. Satisfy all the requirements specified in this document. Output Your program should output statements that claim the existence or violation of each property. A sample program output is given below. File input: matrix5.txt Reflexive - yes Antireflexive - no Symmetric-yes Antisymmetric - yes Deliverables Submit your program and its results for the three test cases given below. You may output the results to a file and submit it. The following should be included in your zipped folder submission: Source code Output for the three test cases Additional test cases and their respective outputs Test cases Matrix1.txt 0000000000 1100000000 1010000000 1001000000 1000 100000 1000010000 1000000000 1000000100 10000 10000 1000000001 Matrix2.txt 100 1101011 0101000100 0010100100 1101000101 1010100100 0000010110 1000001101 0111111100 1000010010 1001001001 Matrix3.txt 0111101011 0011001100 0000100100 1100000101 1010001100 0001000110 1110110101 0111111001 1000010001 100 100 1000

Step by Step Solution

3.37 Rating (144 Votes )

There are 3 Steps involved in it

Step: 1

Java code for above problem import javautil import javaio class Main static variables that stores length of matrix public static int NUM10 testing mai... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java An Introduction To Problem Solving And Programming

Authors: Walter Savitch

8th Edition

0134462033, 978-0134462035

More Books

Students also viewed these Programming questions

Question

=+d) What components would you now say are in this series?

Answered: 1 week ago

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago

Question

24. Why is it important to correct astigmatism earlypg109

Answered: 1 week ago