Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Python PLEASE Clarification: You will need to write your own set operators and not use built-in set operators from Python. Input: The user will

In Python PLEASE

image text in transcribedimage text in transcribedimage text in transcribed

Clarification: You will need to write your own set operators and not use built-in set operators from Python. Input: The user will pass in a command line argument containing two files: 1) A file with a number of lines, with the contents of one set per line. The first character will be the set name, and the other values will be space- separated. Example: A 123 B a b c 2) A file with a number of set operations, one per line. Example: ABC A I C The program might be called like this: ./SetCalculator sets1.txt ops1.txt Output: A file containing the resulting sets, space-separated and one per line. Example: Output: A file containing the resulting sets, space-separated and one per line. Example: 12 a b c Though sets are unordered, please preserve element order so it will be easier to evaluate your program's correctness. Requirements: - Implementation of union, specified by "U" - Implementation of intersection, specified by "I" (capital i) - Implementation of different, specified by "-" "U" and "I" are reserved characters, so there will not be any sets with those names. Notes: - There will be no parentheses, since they require knowledge of stack implementation. Evaluate left to right - All input and output are done with files - Your program must be able to work on test cases other than the ones given. If your program only works on these test cases, it is not done correctly. - Do not harcode the input file names, take them from the command line. - Implementation of intersection, specified by "I" (capital i) - Implementation of different, specified by "-" "U" and "I" are reserved characters, so there will not be any sets with those names. Notes: - There will be no parentheses, since they require knowledge of stack implementation. Evaluate left to right - All input and output are done with files - Your program must be able to work on test cases other than the ones given. If your program only works on these test cases, it is not done correctly. - Do not harcode the input file names, take them from the command line. Submission: - A well-commented file named "SetCalculator.cpp" or "SetCalculator.py" - Five or more good test case input/ output pairings that you have used for testing - Compilation instructions for your program. We will be compiling from the command line and not using an IDE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions