Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Your task is to provide a working application that processes the input files, normalizes them and write merged and normalized data to the output file.

Application requirements:
•	The application must receive two command-line arguments with names of the two input files.
•	Input files must be processed concurrently to save processing time.
•	Input files must be parsed and normalized before writing to the output files.
•	The input files will be provided in CSV and JSON formats.
•	Reading input files must be measured in milliseconds and the result must be written to the log file or console output.
•	Writing to the output file must be done simultaneously from all input files, in a thread-safe manner.
•	Every line in the input file will produce exactly one line in the output file.
•	Input files:
There are two input files, one in CSV and the other in JSON format.
Each file contains three (3) fields:
•	some id (string),
•	quantity (integer)
•	price (double).

CSV line examples with semi-colon (;) as the delimiter, from the file called inputA.csv:
"cfd001";4000;132.50
"afe322";125;678.22

Similar JSON line examples, from the file called inputB.json:
{ "id": "afa072", "quantity": 3000, "price": 22.15 }
{ "id": "bba893", "quantity": 4, "price": 3455.10 }

•	Output file:
The output file must contain mixed lines in CSV format (as they are processed in parallel by each parser) with semi-colon (;) as the delimiter.
Each line contains four (4) fields that represent exactly one input line:
•	input file name (string),
•	id (string),
•	quantity (integer),
•	price (double).

Output file example (using the example lines above):
"inputB";"afa072";3000;22.15
"inputA";"cfd001";4000;132.50
"inputA";"afe322";125;678.22
"inputB";"bba893";4;3455.10

Development requirements:
•	Provide the solution using OOP techniques.
•	Write unit tests wherever you find appropriate.

Task deliverables:

•	Basic development and runtime environment specifications (compiler version, IDE used, target OS);
•	Activity and class diagrams (UML);
•	The source code;
•	The unit tests code;
•	The project files (solution/project files, makefile or similar)
•	The working application;
•	Any additional documentation or explanation you find necessary.


What I have tried:

I dont know how to fined problem solution ?
Posted
Updated 10-Jul-19 8:17am
Comments
Sinisa Hajnal 10-Jul-19 10:43am    
Start with code project, stack overflow and similar. Learn to use search engines to find examples and/or similar solutions. Learn programming language in question and write or use the code to get something, tweak it until you get what you need. Then, when you hit the wall and you don't understand why it doesn't work, return here.
Michael Haephrati 11-Jul-19 9:54am    
The member has been removed. This question should be removed as well. This isn't a question. Its an assignment.

We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.
 
Share this answer
 
There is something similar in C#: JSON to CSV converter[^]

I would recommend you to try your own or search the web. If you get stuck anywhere, ask for help and we will help you on your pin-point issue(s).
People are here to help. Not to do your task or home work.
 
Share this answer
 
The size of your task speaks for some higher education in software skills. You should start by parting the big task in a lot of smaller taskes like your "Task Deliveries" and ensure that you check every "Application Requirements". Dont underestimate such tasks writing some tests or the class diagram or the cocurrent processing.

So you need to learn some C++ from some C++ tutorial and I would suggest that you install Visual Studio.

This is a big task and you need to work hard on it or you will fail. Best is to inform yourself in some tutorials.

My advise is that you do the nasty concurrency at the end to start with the UML and some code and get experience in coding C++.
 
Share this answer
 
Quote:
I dont know how to fined problem solution ?

So, your main effort is pasting the requirement, you show no attempt to solve the problem, you have no question, you just want us to do your job/homework.
Since any job merit salary, you will have to hire a professional programmer, or do the job yourself after having learned programming.
On this site, we help you to fix your code, but you need to have some code and a question describing your problem.
Teaching you programming is way out of scope of the forum.
Quote:
I dont know how to fined problem solution ?

You need to learn problems analyze.
Advice: find some tutorials
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900