-2

I am studying C# and have a task to implement two algorithms by two ways each one (for comparing these ways of realization) and perform this job in a nice form. I would like to know which form will be better. 1 solution - 2 projects - 4 apps (for each way of realisation). 1 solution - 2 projects - 2 apps (one app for every task). 1 solution - 1 proj - 1 app (for all task). Which topics shall I work out to understand mistakes in my points? It would be greateful if you explained the best way of building this task, because it would help me to understand performing programming tasks way better.

I've had problems with setting namespaces, when I tried creating an app for each way of implementing.

  • 1
    Maybe you could add more context, I can hardly understand. Btw for setting namespaces you should follow the folder structure. `ProjectName.ParentFolder.ChildFolder.AnotherFolder` – Hervé Dec 02 '22 at 14:25
  • Sorry if it was incomprehensible. I have to implement Fibonacci sequence by recursion and matrix multiplication method, also GCD finding algorithm by two methods. I would like how to perform this task better way basing on Visual Studio working space, using solution-project-app.exe structure. – Artur Krush Dec 02 '22 at 16:55

1 Answers1

1

I think you're asking about how to structure your project, which might prompt a lot of varied opinions. Given your description, I would probably have 1 solution with 1 project. The different functions you need can all live inside your Program.cs or in one or more separate class files. It sounds like you're building a GUI app, so I would add buttons that invoke the different functions - one button for this function and another for that function.

Programming is part science, part art. There are many ways you can accomplish what you want to do; the "art" part of it is your style. Focus on making it work and then you can refactor to make it elegant.

Vic F
  • 1,143
  • 1
  • 11
  • 26