Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please please help me use c++ and show your output File List02.h struct ListException { ListException(const char* m) { cout cout cout }; class List

please please help me use c++ and show your output image text in transcribed

image text in transcribed

File List02.h

struct ListException {

ListException(const char* m)

{

cout

cout

cout

};

class List { int size; //Number of available elements

int count; //Number of occupied elements

//Index of the next available element

int cursor; //Index of the current element on the list

string* L; //Points to an array of strings used to implement the //List

public:

List(int sz=100):size(sz),count(0),cursor(0){L=new string[size];}

List(istream& i,int sz=100):size(sz),count(0),cursor(0)

{ L=new string[size];

Scan(i)

}

~List(){if (L) delete[] L;}

bool IsFull(void){return count>=size-1;}

void Insert(const string& v){}

void Print(ostream& o,const char* title){}

void Scan(istream& i){}

void First(void){]

void Next(void){}

bool IsEol(void){}

string Member(void){}

};

Discrete Structures CMSC 2123 Assignment: Prohibition: Program Files: Cartesian Product Project po2 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 po2.cpp, Listoz.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 (o) for this project 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 (0) for this project File Description po2.cpp File po2.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 List2.cpp File List02.cpp contains the implementation of class List. pO2make File pO2make contains instructions that create executable program po2 File po2make is interpreted by the Linux command make In the dialog below, the user enters text shown in bold. Display and Keyboard Input: Command Line: 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, SpO2 Enter the name of input file 1: 021.dat Enter the name of input file 2: 1022.dat Enter the output file name: 002.dat SpO2 1021.dat Enter the name of input file 2-1022.dat Enter the output file name 002.dat Spo2 1021.dat 1022.dat Enter the output file name: 002.dat SpO2 1021.dat 1022.dat 002.dat Discrete Structures CMSC 2123 Cartesian Product Project poz 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) LXM-((a,1),(a,2), (6,1), (b,2), (0, 1), (0, 2)}

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

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

Students also viewed these Databases questions

Question

b. Will there be one assigned leader?

Answered: 1 week ago