Hey guys, I need help with a coding assignment for a class. Its been almost 3 years since I’ve last touched a coding program, so I’m a little rusty, and would like some help getting started.
For my assignment, I have to write a program that reads in lines of input, redirects files, process those files, and then outputs the results on a Linux server.
Does anyone know how to do this? I’ve had some experience with C++ and Java, but I’ve never once touched Linux or know about Linux commands.
Thanks! Here’s a direct quote from the assignment on the request:
You are to write a program that reads in lines of input using scanf, and file redirection, process the data, and then output
the results using printf.
The data:
Each line of the data file begins with an ‘e’, ‘c’, or ‘t’.
Lines beginning with ‘e’ will have an integer employee ID and an employee name.
Lines beginning with ‘c’ will have an integer customer ID, customer name, and a floating point account balance.
Lines beginning with a ‘t’ will have a customer ID, employee ID, a ‘w’ or ‘d’ representing withdrawal or deposit,
and a floating point transaction amount.
Lines beginning with an ‘e’ and ‘c’ may be intermingled, but all ‘e’ and ‘c’ lines will come before lines beginning
with ‘t’.
There will be at most 50 employees and 50 customers, and an unknown number of transactions. Names will be at
most 15 characters long.
I understand most of it, all that’s confusing to me is the file redirection using Linux servers. Everything else sort of makes sense, but if someone would like to give me an idea of how to get started, I’d appreciate it a lot.