Results 1 to 4 of 4

Thread: Looking for keen CMD App Tutor

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2016
    Posts
    3

    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

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,508

    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2016
    Posts
    3

    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.

  4. #4
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,175

    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
  •  



Click Here to Expand Forum to Full Width