1. Homepage
  2. Coding
  3. ECS 034: Software Development in UNIX & C++ - Project 2: CDSVReader and CDSVWriter

ECS 034: Software Development in UNIX & C++ - Project 2: CDSVReader and CDSVWriter

Order Now
UCDavisECS 034ECS34Software Development in UNIX & C++C++CDSVReaderCDSVWriter

You will be working with a partner for this project. This specification is subject to change at any time for additional clarification. Assignment Writing Service

Desired Outcomes Assignment Writing Service

  • ●  Exposure to GoogleTest Assignment Writing Service

  • ●  Exposure to Expat XML library Assignment Writing Service

  • ●  Use of git repository Assignment Writing Service

  • ●  Exposure to documenting code in Markdown Assignment Writing Service

  • ●  An understanding of how to develop Makefiles that build and execute unit tests Assignment Writing Service

  • ●  An understanding of delimiter-separated-value files Assignment Writing Service

  • ●  An understanding of XML files Assignment Writing Service

  • ●  An understanding of how to integrate a third-party C library in C++ Assignment Writing Service

    Project Description Assignment Writing Service

    You will be implementing and documenting several C++ classes to generate and parse both delimiter-separated-value (DSV) and XML files. To guide your development and to provide exposure to Test Driven Development, you will be developing GoogleTest tests to test your classes. You will also be developing a Makefile to compile and run your tests. You must use good coding practice by developing this project in a git repository. DSV is a way of exchanging information, you can read more here. Some of the most common forms are comma-separated-value (CSV) and tab-separated-value (TSV) files. You will be implementing two classes CDSVReader and CDSVWriter that have simple interfaces for parsing and generating DSV respectively. Assignment Writing Service

    // Constructor for DSV reader, src specifies the data source and delimiter // specifies the delimiting character
    CDSVReader(std::shared_ptr< CDataSource > src,
    char delimiter); Assignment Writing Service

    // Destructor for DSV reader ~CDSVReader(); Assignment Writing Service

    // Returns true if all rows have been read from the DSV bool End() const; Assignment Writing Service

    // Returns true if the row is successfully read, one string will be put in // the row per column
    bool ReadRow(std::vector< std::string > &row); Assignment Writing Service

    bool quoteall = false); // Destructor for DSV writer Assignment Writing Service

~CDSVWriter(); Assignment Writing Service

// Returns true if the row is successfully written, one string per column // should be put in the row vector
bool WriteRow(const std::vector< std::string > &row); Assignment Writing Service

Some nuances to keep in mind when developing the functions. Assignment Writing Service

  • ●  Values that have either the delimiter, double quote character ‘"’, or newline must be quoted with double quotes. Assignment Writing Service

  • ●  Double quote characters in the cell must be replaced with two double quotes. Assignment Writing Service

  • ●  An empty line is a valid row where there are no values. Assignment Writing Service

  • ●  A double quote specified as a delimiter is interpreted as a comma ‘,’. Assignment Writing Service

    You will be implementing two classes CXMLReader and CXMLWriter that have simple interfaces for parsing and generating XML respectively. The SXMLEntity struct is used by Assignment Writing Service

    both classes and has been provided. Complete XML parsing is complicated and beyond the scope of a single assignment; therefore, you will be utilizing the Expat library, a commonly used library for parsing XML. To link the Expat library (libexpat) with your project, use the -lexpat as a linker option. Assignment Writing Service

    SXMLEntity{
    EType DType; // Type of entity start/end/complete element std::string DNameData;
    std::vector< TAttribute > DAttributes;
    Assignment Writing Service

    }
    // returns true if the attribute name is in the DAttributes
    Assignment Writing Service

    bool AttributeExists(const std::string &name) const; Assignment Writing Service

    // returns the value of the attribute, or empty string if // doesn't exist
    std::string AttributeValue(
    const std::string &name) const; Assignment Writing Service

    // Sets the attribute name to the value
    bool SetAttribute(const std::string &name, const std::string &value); Assignment Writing Service

    // Constructor for XML reader, src specifies the data source CXMLReader(std::shared_ptr< CDataSource > src); Assignment Writing Service

    // Destructor for XML reader ~CXMLReader(); Assignment Writing Service

    // Returns true if all entities have been read from the XML bool End() const; Assignment Writing Service

    // Returns true if the entity is successfully read if skipcdata // is true only element type entities will be returned
    bool ReadEntity(SXMLEntity &entity, bool skipcdata = false); Assignment Writing Service

    Project 2 2 of 6 Assignment Writing Service

ECS34 WQ25 February 4, 2025 Assignment Writing Service

// Constructor for XML writer, sink specifies the data destination CXMLWriter(std::shared_ptr< CDataSink > sink); Assignment Writing Service

// Destructor for XML writer ~CXMLWriter(); Assignment Writing Service

// Outputs all end elements for those that have been started bool Flush(); Assignment Writing Service

// Writes out the entity to the output stream bool WriteEntity(const SXMLEntity &entity); Assignment Writing Service

To abstract the data input/output for the DSV and XML classes, two simple abstract classes CDataSource and CDataSink have been provided for input and output respectively. String implementations of CDataSource and CDataSink, CStringDataSource and CStringDataSink respectively have been provided with associated GoogleTest tests. Assignment Writing Service

The Makefile you develop needs to implement the following: Assignment Writing Service

ECS34 WQ25 February 4, 2025 Assignment Writing Service

You should avoid using existing source code as a primer that is currently available on the Internet. You MUST specify in your README.md file any sources of code that you have viewed to help you complete this project. You MUST properly document ALL uses of Generative AI following the guidelines outlined in the Generative AI Restrictions. All class projects will be submitted to MOSS to determine if students have excessively collaborated. Excessive collaboration, or failure to list external code sources will result in the matter being referred to Student Judicial Affairs. Assignment Writing Service

Recommended Approach Assignment Writing Service

The recommended approach is as follows: Assignment Writing Service

  1. Create a git repository and add your project 1 and provided files. Assignment Writing Service

  2. Update your project 1 Makefile to meet the specified requirements. The order of the tests Assignment Writing Service

    to be run should be teststrutils, teststrdatasource, teststrdatasink, Assignment Writing Service

    testdsv, and then testxml Assignment Writing Service

  3. Verify that your string utils, string data source, and string data sink tests all compile, run Assignment Writing Service

    and pass. Assignment Writing Service

  4. Create the docs directory, and begin documenting the classes and functions. Assignment Writing Service

  5. Create the files and skeleton functions for DSVReader.cpp, DSVWriter.cpp, Assignment Writing Service

    XMLReader.cpp, XMLWriter.cpp, DSVTest.cpp, and XMLTest.cpp. Assignment Writing Service

  6. Write tests for the DSV and XML classes. Each test you write should fail, make sure to Assignment Writing Service

    have sufficient coverage of the possible input parameters. Assignment Writing Service

  7. Once tests have been written that fail with the initial skeleton functions, begin writing Assignment Writing Service

    your DSV functions. You may want to start with the writer, this may allow the use of the Assignment Writing Service

    writer in testing the reader. Assignment Writing Service

  8. Once the DSV classes are complete, begin writing your XML functions. Like the DSV Assignment Writing Service

    functions, you may want to start with the writer, this may allow the use of the writer in testing the reader. Assignment Writing Service

Grading Assignment Writing Service

Make sure your code compiles on Gradescope and passes all the test cases. Assignment Writing Service

Helpful Hints Assignment Writing Service

Assignment Writing Service

ECS34 WQ25 February 4, 2025 Assignment Writing Service

Project 2 5 of 6  Assignment Writing Service

联系辅导老师!
私密保护
WeChat 微信
UCDavis代写,ECS 034代写,ECS34代写,Software Development in UNIX & C++代写,C++代写,CDSVReader代写,CDSVWriter代写,UCDavis代编,ECS 034代编,ECS34代编,Software Development in UNIX & C++代编,C++代编,CDSVReader代编,CDSVWriter代编,UCDavis代考,ECS 034代考,ECS34代考,Software Development in UNIX & C++代考,C++代考,CDSVReader代考,CDSVWriter代考,UCDavis代做,ECS 034代做,ECS34代做,Software Development in UNIX & C++代做,C++代做,CDSVReader代做,CDSVWriter代做,UCDavishelp,ECS 034help,ECS34help,Software Development in UNIX & C++help,C++help,CDSVReaderhelp,CDSVWriterhelp,UCDavis作业代写,ECS 034作业代写,ECS34作业代写,Software Development in UNIX & C++作业代写,C++作业代写,CDSVReader作业代写,CDSVWriter作业代写,UCDavis编程代写,ECS 034编程代写,ECS34编程代写,Software Development in UNIX & C++编程代写,C++编程代写,CDSVReader编程代写,CDSVWriter编程代写,UCDavis作业答案,ECS 034作业答案,ECS34作业答案,Software Development in UNIX & C++作业答案,C++作业答案,CDSVReader作业答案,CDSVWriter作业答案,