Tag Archives: school

VB.net Compare Assignment

Here’s the assignment for Lab3. The next class session will show us .

Public Class frmCompare

    '----JDS-----------------------
    'CREATED:    10/15/2014
    'CREATED BY: James Strickland
    'CLASS:      COP2010 - 090898
    'PURPOSE:    Write a Windows Application
    '            program that inputs
    '            three different integers
    '            and displays results
    '            in a listbox
    '----JDS-----------------------

    ' Declare variables
    ' inum=InputNumber
    Dim inum1, inum2, inum3 As Integer

    ' onum=OutputNumber
    Dim onum1, onum2, onum3, max, min As Integer

    Private Sub frmCompare_Load(sender As Object, _
                                e As EventArgs) _
                            Handles MyBase.Load

        ' Hide the "About" label at form load
        lblAbout.Visible = False

    End Sub


    Private Sub btnGo_Click(sender As Object, _
                        e As EventArgs) _
                        Handles btnExe.Click

        ' The following code is executed 
        ' when the EXECUTE button is pressed

        ' Get the users 3 numbers and load
        ' them into the 3 input variables
        inum1 = txtInput1.Text
        inum2 = txtInput2.Text
        inum3 = txtInput3.Text

        ' Clear list box encase user wants to 
        ' repeat program without scrolling 
        ' down listbox.
        LstBoxResults.Items.Clear()

        ' Display numbers as user entered them
        ' seperated by comma
        LstBoxResults.Items.Add("Numbers in User Order:")
        LstBoxResults.Items.Add(inum1 & ", " & inum2 & ", " & inum3)
        LstBoxResults.Items.Add("") ' simply creates a space between answers

        ' Display Sum of users entered numbers
        LstBoxResults.Items.Add("Sum of numbers:") ' Displays to user
        LstBoxResults.Items.Add(inum1 + inum2 + inum3) ' does the math
        LstBoxResults.Items.Add("") ' simply creates a space between answers

        ' Display Average of numbers
        LstBoxResults.Items.Add("Average of Numbers:") ' Displays to user
        LstBoxResults.Items.Add((inum1 + inum2 + inum3) \ 3) ' does the math
        LstBoxResults.Items.Add("") ' simply creates a space between answers

        ' Display Product of numbers
        LstBoxResults.Items.Add("Product of numbers:") ' Displays to user
        LstBoxResults.Items.Add(inum1 * inum2 * inum3) ' Does the math
        LstBoxResults.Items.Add("") ' simply creates a space between answers

        ' Display Largest of the 3 numbers
        LstBoxResults.Items.Add("Largest of the 3:")
        max = inum1 ' Init variable mas a first number entered, the compare below...

        If inum2 > max Then
            max = inum2 ' inum2 greater than max, init max as inum2 (inum2 is smaller)
        End If

        If inum3 > max Then
            max = inum3 ' inum3 greater than max, init max as inum3 (inum3 is smaller)
        End If

        LstBoxResults.Items.Add(max)
        LstBoxResults.Items.Add("") ' simply creates a space between answers

        ' Display Smallest of the 3 numbers
        LstBoxResults.Items.Add("Smallest of the 3:")
        min = inum1 ' init min as inum1

        If inum2 < min Then
            min = inum2 ' inum2 less than min, init min as inum2 (inum2 is bigger)
        End If

        If inum3 < min Then
            min = inum3 ' inum3 less than min, init min as inum3 (inum3 is bigger)
        End If

        LstBoxResults.Items.Add(min) ' Display results of min
        LstBoxResults.Items.Add("") ' simply creates a space between answers

    End Sub

    ' Close/Exit the program
    Private Sub btnExit_Click(ByVal sender As System.Object, _
                              ByVal e As System.EventArgs) _
                              Handles btnExit.Click
        Close()

    End Sub



    Private Sub btnAbout_Click(sender As Object, _
                               e As EventArgs) _
                               Handles btnAbout.Click
        ' The below code hides the form content and 
        ' displays information about the programmer
        ' (when the user presses the "about" button)
        ' which happens to be me. For those who does
        ' not know me, I am a big deal around here..
        ' I mean, I didn't want to say nuthin.......

        ' Clear Form
        btnExe.Visible = False
        lblEnterNumbers.Visible = False
        lblInstruction.Visible = False
        txtInput1.Visible = False
        txtInput2.Visible = False
        txtInput3.Visible = False
        LstBoxResults.Visible = False

        ' About Programmer
        lblAbout.Visible = True

    End Sub

End Class

 

Yet another new look

Yet another year is about to pass, as such, so should the old look. I was going for a “paper” look, to match the “theme” I have for my main site. Doesn’t really match, but it will work.  It is my intention to write more in my blog in 2012.

I really hope 2012 to be a prosperous year for our family. We certainly need some prosperity! I will go back to school next month getting my computer certifications. North West Florida State College is my weapon of choice.  I should come out with Comptia A+, Security+, Linux+, and Network+ and a College Certificate in IT Technology.

A+ Certification

Recently finished my degree, and have started studying for my A+ certification.  While finishing up my degree, I discovered that the Air Force will pay $4500 dollars to take classes for certifications.  Further research revealed that the Air Force offered free training CBT’s (Computer Based Training).  These CBT’s cover A+ and Network + just to cover a few.  My goal is to be certified on A+, Network+ and Security+ prior to me getting out of the Military in 4 years.  The only thing the Air Force will not pay for is the test fee’s.

English Class 1st Essay

I posted my first Essay today. It was to be on a Hero, and we are to explain why he/she was a hero in our eyes. I didn’t want to choose a military hero, as there are thousands of those, I wanted someone different. I chose Bill Gates. With all the volunteer work and donations he gives to the American School system, he is a hero in my eyes.

WIsh my luck!

I will not throw paper airplanes in class!!!

Stumbled upon this cartoon:
Paper Airplanes

Thought this was hilarious!!!  Of course, since I’m not much of a C++ programmer, I would do something like this:

Sub airplanes()

Range("A1").Value = "I will not throw paper airplanes in class"
Range("A1").Copy
Range("A2:A500").PasteSpecial

End Sub

throw this in a spreadsheet then email it to the teacher!!! Ok, so this method wouldn’t be as cool as the pic, but it would work and save time! Wonder how you could do this in BASH…

Happy Labor Day!!!

Greetings readers…

The weather here in Virginia is starting to cool down, as the Summer highway quickly comes to an end.  Fall is now upon us, with a nice cool Atlantic breeze blowing across my patio.  The sweltering summer days are finally over.   Labor Day is a matter of hours away.  The stores are already starting to sell Halloween supplies.  Shortly thereafter Thanksgiving and Christmas supplies will be in the mix as well.  Pretty much the remainder of the year is the last of the sand in an hour glass.

With the change of seasons, comes the York Counties first day of school.  Along with that comes quiet throughout the neighborhoods and throughout the house as well.  A much needed rest for my wife, I’m sure.  My oldest Daughter will start 1st grade, then Matthew will start 4th grade, then John will start 7th grade… Advanced I might add, taking 2 highschool courses.  I’m so proud.

Work… well… I think I should refrain from posting things about work at this time.

Recently I purchased a used metal detector from Craigslist.  It is notEnou a Whites detector, but a Bounty Hunter.  It’s a cheaper model, probably around $100, but will do until I get my new Whites XLT or whatever model I decided.  This will happen next month, and I can’t wait.

Think I close this entry up now, I’m sitting out on my back patio enjoying the cool breeze; as the sun eases across the horizon and darkness falls upon us… another day will come, and with it comes more challenges.  Approach each challenge wisely!

July Updates

Fellow Readers… (Whomever that may be…)

Just some updates.  July was a busy month for me.  My little baby had to have surgery, so we were flown Hawaii where Doctors at Tripler Army Medical Center (TAMC) operated on my little girl.  The surgery went well, and we are very thankful.

It was very nice to visit Hawaii, but I was glad, as always, to get back home.  My Dad was fortunate enough to make it over to be with Audrey and I during the surgery.  This was the first time he had flown since around 1966.  Airports and aircraft have changed dramatically since then, huh?

I’m back to work now, and actually looked forward to coming to work for the first time in a long time.  The weather is raining, as usual this time in the pacific.  August is just around the corner, and school will be starting.

Sabayon Linux 3.5 was released while I was gone.  I’m downloading it now, and will install it when it’s done downloading or later on this week.  Probably won’t be done downloading until later on this week.  My ISP sucks over here.

As far as my website goes, I plan on redoing it once again.  It needs a new look.  I’m pretty much tired of the look.  And since I have more time now, I plan on hand coding my new site.  As soon as I come up with a color scheme, I’ll get busy.

Enough for now… I’ll try to post more later and include some photo’s I took in Hawaii…

-ME