QuestionQuestion

Transcribed TextTranscribed Text

Notes Public variables: At minimal you need to have the TEMP value as public so it can retain value Other variables can be made public if you choose. Bonus: If you plan on doing the bonus work you will also need the following public variables, a Boolean value for logging being true or false. Create a filestream and writer object Interface: You must have progress bars to visually display the amount of coolant flow and control rod use. They must have their limits set to those listed for both in the project document to prevent non valid values Note! You must use the error handling code for adding or removing values from the progress bars as we saw them in controldemo.zip Buttons must be used to add or remove value from them as well, not textboxes. Whatever the value of the progress bars are their numeric value needs to be shown in addition to the visual presentation the bar itself provides. Flow of timer tick event - pull values from the progress bars begin to build tempadd tempadd = controlrod(rod value) < this will set initial 200 degrees! tempadd = coolant(coolant value, tempadd) tempadd = tempadd minus 30 degrees TEMP = TEMP plus tempadd Now, we only care about TEMP as it is what will be fed to the other functions Order of calling these functions is important as each delivers the value the following function will need. You CANNOT simply call these in any random order as either null values or incorrect values WILL result! TEMP is needed for PSI PSI is needed for RPM RPM is needed for POWER CORESTATUS and TURBINE STATUS can be called now in either order your tick event must contain a test for the "logging" boolean variable. If TRUE then you will perform a writeline showing ALL values presented on the interface Start and stop log buttons Start - change the logging variable to TRUE and write initial HTML, BODY, and TABLE tags. Also write the column labels to show what each column will represent in the log log = True w.WriteLine("<html><body><table>") Stop - logging = false and you will close the tags for TABLE, BODY, and HTML w.WriteLine("</table></Body></html>") w.Close() Note for functions: ANY data a function needs MUST be sent in via parameters, NOT public variables and NOT interface components! Output all values to the interface. Textboxes or labels will be fine for output of these values All interface components MUST be clearly labels as to what they are and do.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Public Class Form1
   
    ' Declaring Public Variable
    Public TEMP As Double
    Public bolLogging As Boolean
    Public w As System.IO.StreamWriter

    ' Start Button, when click
    Private Sub btnStart_Click(sender As Object, e As EventArgs) Handles btnStart.Click

       ' Timer is enabled
       timNukeClk.Enabled = True
       ' Start button is disabled
       btnStart.Enabled = False
       ' Start button is disabled
       btnStop.Enabled = True
    End Sub


    ' Start logging in the form of a web page
    Private Sub btnStartLog_Click(sender As Object, e As EventArgs) Handles btnStartLog.Click
       ' Open file
       w = My.Computer.FileSystem.OpenTextFileWriter("test.html", True)
       ' Setting Logging Boolean Value to True
       bolLogging = True
       ' Writing the web page table headings and portion
       w.WriteLine("<html><body><table border='1' style='width:50%'>")
       w.WriteLine("<tr><td>Coolant Flow (GPM)</td>")
       w.WriteLine("<td>Rod Insertion %</td>")
       w.WriteLine("<td>Core Temp.</td>")
       w.WriteLine("<td>PSI</td>")
       w.WriteLine("<td>Power (Watts)</td>")
       w.WriteLine("<td>Turbine (RPM)</td>")
       w.WriteLine("<td>Core Status(Watts)</td>")
       w.WriteLine("<td>Turbine Status (RPM)</td></tr>")
       ' Disable Stop Log Button
       btnStartLog.Enabled = False
       ' Enable Save Log Button
       btnSaveLog.Enabled = True
    End Sub
    ' Save Log Button, when clicked
    Private Sub btnSaveLog_Click(sender As Object, e As EventArgs) Handles btnSaveLog.Click
       ' Logging boolean value is set to false
       bolLogging = False
       ' Write the closing web page closing tags
       w.WriteLine("</table></Body></html>")
       ' Fiie is closed
       w.Close()
       ' Start Log button is enabled
       btnStartLog.Enabled = True
       'Save Log button is disabled
       btnSaveLog.Enabled = False
    End Sub
    'Coolant increase flow button, when clicked
    Private Sub btnCoolFlUp_Click(sender As Object, e As EventArgs) Handles btnCoolFlUp.Click
       ' Coolant Flow Progress bar gets increased by 1
       pbCoolantFlowV.Increment(1)

    End Sub
    'Coolant decrease flow button, when clicked
    Private Sub btnCoolFlDown_Click(sender As Object, e As EventArgs) Handles btnCoolFlDown.Click
       ' Coolant Flow Progress bar gets decreased by 1
       pbCoolantFlowV.Increment(-1)
    End Sub
    'Rod insertion increase button, when clicked
    Private Sub btnRodInsUp_Click(sender As Object, e As EventArgs) Handles btnRodInsUp.Click
       If pbRodInPerV.Value >= 101 Then
            pbRodInPerV.Increment(-1)
       Else
            pbRodInPerV.Increment(1)
       End If
    End Sub
    'Rod insertion decrease button, when clicked
    Private Sub btnRodInsDown_Click(sender As Object, e As EventArgs) Handles btnRodInsDown.Click
       If pbRodInPerV.Value <= -1 Then
            pbRodInPerV.Increment(1)
       Else
            pbRodInPerV.Increment(-1)
       End If
    End Sub...
$100.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Visual Basic Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats