Question: please please use c++ and show you output Discrete Structures CMSC 2123 Cartesian Product Project p02 Assignment: Prohibition: Program po2 prints all the elements in

Discrete Structures CMSC 2123 Cartesian Product Project p02 Assignment: Prohibition: Program po2 prints all the elements in the Cartesian product of two sets. Use of the Ch Standard Template Library is prohibited in the implementation of this project. Project 2 consists of files p02.cpp, Listo2.h, Listo2.cpp, and po2make. Project 2 file names are exactly as given. Failure to employ the foregoing names will result in a score of zero (0) for this project Program Files: Display and Keyboard Input: Command Line: Project files must be stored in the root directory of your student account. Failure to store project files in the root directory of your student account will result in a score of zero (O) for this project. File Description po2.cpp File p02.cpp contains functions that process command line arguments and compute results specified in the assignment. List2.h File Listo2.h contains the interface of class List employed to represent a set from which values are drawn to make a Cartesian product. Listo2.cpp File List2.cpp contains the implementation of class List. po2make File po2make contains instructions that create executable program poz. File po2make is interpreted by the Linux command make. In the dialog below, the user enters text shown in bold. Project 2 can be invoked with zero, one, two or three program parameters. The first program parameter is the name of the input file containing the first of the two sets from which the Cartesian product is created. The second parameter is the name of the second of the two sets from which the Cartesian product is created. The third parameter is the name of the file containing the set of Cartesian products, listed as ordered pairs. Sample command lines together with corresponding actions by program po2 are shown below. Boldfaced type indicates data entered at the keyboard by the user. S poz Enter the name of input file 1: 1021.dat Enter the name of input file 2: 1022.dat Enter the output file name: 002.dat $ po2 1021.dat Enter the name of input file 2: 1022.dat Enter the output file name: 002.dat SpO2 i021.dat 1022.dat Enter the output file name: 002.dat SpO2 1021.dat 1022.dat 002.dat Discrete Structures CMSC 2123 Cartesian Product Project p02 Input File The input file consists of a sequence of unique strings. No two strings can Specifications: be identical. Strings are separated by white space. White space is one or more characters from the set that includes a blank character, a newline character, or a tab character. Example Input File abc 1: Example Input File 12 2: Output File The output file consists of the set of Cartesian products created from the Specification: two input files. Elements of the set are enclosed in curly braces, (), and separated by commas. Each element of the set is an ordered pair enclosed in parentheses where an element from the first set is separated from and element from the second set by a comma. Example Output File L={a,b,c} M-(1,2) L XM-((a,1),(a,2), (b,1), (6,2), (0, 1), (0, 2)}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
