Find Jobs
Hire Freelancers

C++ programming assignment

$30-250 USD

In Progress
Posted over 9 years ago

$30-250 USD

Paid on delivery
This assignment builds on a previous assignment which is provided in attached zip folder. The previous assignment parses the element names in an XML file and creates Element object names for each of them. The new assignment is to test an XML well-formedness. To accomplish this, the parser and program need to be enhanced to do the following: -Initialize the state of the parser. -Read an XML file containing data on several of your favorite songs. -“Parse” each line as it is read in and pick out element opening tags. -Print information about each tag. -Push tags that are not closed on the same line as their opening tag onto a stack. -When you find a closing tag, check to make sure that it matches the last element on the stack. -If it does, pop the stack. If it does not, print an error message. -Display the stack as it grows and shrinks. WHAT NEEDS TO BE DONE: 1) Begin by declaring all of the parser states you will need in this program. Write a function that will display the parser state at any given moment so that you have it handy during debugging. 2) Initialize an STL vector or stack that will store pointers (references) to Element objects. This stack will hold pointers to elements that have not yet been closed as you move through each line of the file. This vector could simply hold the names of those elements as string objects, but it is more meaningful to store pointers (references) to actual Element objects themselves. 3) Write a function that will display the contents of this vector or stack for testing purposes. Search the web for an elegant and efficient way to do this using iterators. 4) Next, start enhancing your function that reads the XML file. There are a number of things that you will have to add to this file — most importantly information about the parser state — that we will discuss in class. But at this point you can write the main parts of the function: (a) the commands needed to open and close the XML file and read it line-by-line, and (b) a large switch statement that displays information for each of the parser states that you define. 5) The last major step is to write the function that parses each line of data. This is a complex function that has to check for lots of conditions in a series of if / else if / else tests for each state. Note that some tests will need to know the parser’s current state to fully determine what’s going on. Therefore, there are a number of parameters that you must pass into this function, and a number of values besides the parser state that you must return. Also, the order of your tests will be significant. We will discuss these issues further in class. *NOTES*: The output of the program should look very similar if not exactly like the output file included named, "output for new assignment". I am using a different XML file than the one in the output file so the element names and attributes will be different.
Project ID: 6628163

About the project

2 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Dear sir, I've read your requirement also check the attachment carefully. With 10 years working with C++ with much experience dealing with XML, I could be a good fit. Since your project is urgen, I'll put my most effort to complete it within 30 hours (1.25 day) Kind regards, Tin Tan
$80 USD in 1 day
4.8 (5 reviews)
2.2
2.2
2 freelancers are bidding on average $179 USD for this job
User Avatar
Hi Mate, I AM READY TO FINISH THIS C++ ASSIGNMENT WITH IN 4 DAYS I have seen your project post and surely telling you that we have an experience for this kind of project development. We are best in outsourcing business since 2004 and we have 250+ highly skilled developers for Mobile, Web, Animation, Game Development and Internet Marketing. We have to ask some questions regarding your scope so, kindly go through it: 1) What is your best offer and timeline for this task? 2) When would you expect to start this project development? 3) Please share us your SKYPE for best communication. We serve you better and expect us to be choosing my company for your project selection area. Awaiting from hear you very soon..... Cordially, Vivian
$188 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$277 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Electrical engineer that worked on a lot of C++ projects. Laboratory assistant on a course Objet-Oriented programming C++. Also works for the German company with the focus on C++ projects
$111 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Lowell, United States
5.0
2
Payment method verified
Member since Oct 22, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.