Is this the correct use of console arguments or is there a better way

  • Thread starter Thread starter Roelof1967
  • Start date Start date
R

Roelof1967

Guest
Helllo,


I have this assignment :


Create a system where you can add and remove libraries for a specific town, add, remove or edit books.

where the cities are folders and the stores are json files.

We did not learn databases so far.

Now I thinking of using console arguments to solve this in a nice way.

So far I did this :



private static void DisplayHelpText()
{
Console.WriteLine("usage: -f inputFileName -c cityName -bs bookstore -book bookName [shown/add/remove/edit]");
Console.WriteLine("options:");
Console.WriteLine("-f required The Json file to read the data from");
Console.WriteLine("-c required the city where the bookstore is located");
Console.WriteLine("--shown Shows all the books from a bookstore in a city");
Console.WriteLine("-- add add a book to bookstore in a city");
Console.WriteLine("-- remove) remove a book from a bookstore in a city");
Console.WriteLine("-- edit -- [name, author, avaibility] newValue edit a book property from a bookstore in a city");
Console.WriteLine("-- avaiblity [taken/avaible/reserved");
}

is this a good way or is there a better way I can make this work ?

Continue reading...
 
Back
Top