Need to create a simple file replication program in Linux.. need major help.
Alright.. so I've been given this assignment to create a File Replication program that will allow a user to create, delete, read, write, and close a file through a text menu. It's been a long time since I've programmed, so I honestly have no idea where to start and how to go about doing this.
Here is the entire assignment sheet which details what I need to do:
http://dharmeshcpatel.com/project2.pdf
I've never programmed in Linux, so I guess setting up the text menu would be a good start.
Re: Need to create a simple file replication program in Linux.. need major help.
Quote:
Originally Posted by
dpatel304
I've never programmed in Linux, so I guess setting up the text menu would be a good start.
It is not a good start. All you would be doing is wasting a lot of time getting nice looking menu working, and the important part of the program, i.e. manipulating a file, would go undone. I read your assignment, and honestly, the first part about the menu should be the last thing you should be working on.
The first thing you should do is learn how to manipulate a file. Then it doesn't matter what menu or what input mechanism you come up with to manipulate the file.
Code:
#include <cstdio>
int CreateFile( )
{
}
int CopyFile()
{
}
int main()
{
CreateFile(); //etc
}
Once you create these functions. then you test them with a simple program. Once you have convinced yourself that you can create, move, copy, etc. a file, then you write a program based on these functions. You don't go waste time on GUI, and then when the deadline gets hit, your program doesn't do anything except display some nice text.
If your program only shows a menu that doesn't do anything, you should get 0 or minimum points -- any novice programmer can make a menu with nice looking text. If you have a program that contains functions that manipulate files correctly, as stated by your assignment, and you didn't finish the menu (but the functions do work when you call them), then you get a majority of the points. The reason being that he important part of the program was completed. A mistake that a lot of beginners make is waste time on GUI, I/O, etc. and then run out of time actually making the program do the important, real work of the assignment -- in your case it's manipulating files.
Regards,
Paul McKenzie
Re: Need to create a simple file replication program in Linux.. need major help.
Hi dpatel304,
so I stuck in the same programming assignment and somewhat similar situation as yours. I have been programming in Java and Python and minimal experience programming in C using Linux. I would appreciate if you have this program on your and would like to share it with me so I can get help with it.
Email: [email protected]
Thanks in advance.
Danny
Re: Need to create a simple file replication program in Linux.. need major help.
Quote:
Originally Posted by
dpatel304
Alright.. so I've been given this assignment to create a File Replication program that will allow a user to create, delete, read, write, and close a file through a text menu. It's been a long time since I've programmed, so I honestly have no idea where to start and how to go about doing this.
Here is the entire assignment sheet which details what I need to do:
http://dharmeshcpatel.com/project2.pdf
I've never programmed in Linux, so I guess setting up the text menu would be a good start.
What are you gong to be using for your programming tools? If you are in linux, or windows cygwin, you can just use the bash shell and a text editor. I like gedit, and vim, but there is also emacs, nano, and others. You can also use an IDE, which combines allot of programming tools into a single gui platform. If you are short on time, learning how to use an IDE may not be the best choice
You need to make sure that your linux environment is configured for programming, that is to say make sure you have all the right packages installed. It would help if you would post the distro and version of linux you are using. I think you need to start by writing, compiling, and linking a very simple program that does nothing but print some test to the screen just to make sure your environment is properly configured..
Post back if you want help with that.
LMHmedchem
Re: Need to create a simple file replication program in Linux.. need major help.
THread is a year old, resurected by reqquest for work.
Re: Need to create a simple file replication program in Linux.. need major help.
Quote:
Originally Posted by
monarch_dodra
THread is a year old, resurected by reqquest for work.
Wouldn't a PM have been a better option?
LMHmedchem
Re: Need to create a simple file replication program in Linux.. need major help.
Quote:
Originally Posted by
LMHmedchem
Wouldn't a PM have been a better option?
The post wasn't specifically targeted at you. It was so that other users would take it into account before replying.