|
-
Apr 1st, 2016, 11:11 AM
#1
Thread Starter
New Member
Looking for keen CMD App Tutor
I have a project due in within the next couple of days - its a mathematical project where a menu driven command line app has to be created. There are several requirements for the app - including quadratic equations solver, monte-carlo inegration and prime numbers.
I have the full project requirements and criteria - anyone who's free to help etc. feel free to contact.
I would appreciate any sort of help
Thanks
-
Apr 1st, 2016, 11:26 AM
#2
Re: Looking for keen CMD App Tutor
There's lots of people that will help. What are you having a problem with. What have you tried? Are you getting errors? You should also post your current code that your having problems with.
-
Apr 1st, 2016, 12:40 PM
#3
Thread Starter
New Member
Re: Looking for keen CMD App Tutor
I have only started.
Code:
Module Module1
'Application Title Screen
Sub Main()
Console.Title = ("Coursework Project - ")
Console.SetCursorPosition(20, 10) 'This command centres the text on the screen
Console.WriteLine("***COURSEWORK PROJECT - ***")
Console.ReadLine()
Console.Clear()
Console.WriteLine("Coursework Project - ")
Console.WriteLine("---------------------------------")
Console.WriteLine()
Console.WriteLine("Please choose from options 1-5")
Console.WriteLine()
Console.WriteLine("1. Accuracy Option")
Console.WriteLine("2. Quadratic Equation")
Console.WriteLine("3. Monte-Carlo Integration")
Console.WriteLine("4. Prime Decision")
Console.WriteLine()
Console.WriteLine("5. Exit ")
Console.ReadLine()
End Sub
End Module
here's the outline of the project : https://drive.google.com/open?id=0B3...HRZMmJqUHEtWFE
My vb knowledge is very limited so I'm not even sure where to start :/
Last edited by Willis1; Apr 1st, 2016 at 12:44 PM.
-
Apr 2nd, 2016, 07:04 PM
#4
Re: Looking for keen CMD App Tutor
We can't do your homework for you, we can only give you examples and code snippets. Also I can't access your google drive because i don't have access i requested access, but until then i don't know the details, try screenshotting and uploading it to a post.
Check here: http://numerics.mathdotnet.com/ about half way down you will find the vb.net code.
I will be working to find more info for you
Edit:
Source: http://programmingproj.blogspot.com/...uation_30.html
For Quadratic Equations:
Code:
Module Module1
Sub Main()
Dim a, b, c As Single
Console.WriteLine("Write coefficient 'a'")
a = Console.ReadLine
Console.WriteLine("Write coefficient 'b'")
b = Console.ReadLine
Console.WriteLine("Write coefficient 'c'")
c = Console.ReadLine
Dim d As Integer = b ^ 2 - 4 * a * c
If d >= 0 Then
If d = 0 Then
Console.WriteLine("Roots are real and equal")
Else
Console.WriteLine("Roots are real and different")
End If
Console.Write("Roots are: ")
Console.Write((-b + d ^ 0.5) / (2 * a) & " , ")
Console.WriteLine((-b - d ^ 0.5) / (2 * a))
Else
Console.WriteLine("Roots are complex")
Console.Write("Roots are: ")
Console.Write(-b / (2 * a) & "+" & (d * -1) ^ 0.5 / (2 * a) & "i")
Console.Write(" , ")
Console.WriteLine(-b / (2 * a) & "-" & (d * -1) ^ 0.5 / (2 * a) & "i")
End If
Console.ReadLine()
End Sub
End Module
Looks like that code doesn't really work :/
But it gives you a idea.
Good working examples:
https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
Do you understand the basics?
To give feedback you use the readline, then writeline to generate the response:
Code:
Module Module1
Sub Main()
While True
' Read value.
Dim s As String = Console.ReadLine()
' Test the value.
If s = "1" Then
Console.WriteLine("One")
ElseIf s = "2" Then
Console.WriteLine("Two")
End If
' Write the value.
Console.WriteLine("You typed " + s)
End While
End Sub
End Module
Look here: http://stackoverflow.com/questions/2...tputting-resul
And here: http://codereview.stackexchange.com/...-age-in-vb-net
http://www.dotnetperls.com/console-vbnet
https://msdn.microsoft.com/en-us/lib...(v=vs.71).aspx
All these links will give you some guidence on how to complete your assignment. Best of luck!
-Jdc
Last edited by jdc20181; Apr 2nd, 2016 at 07:18 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|