E-Mail: Password:




School Database

Language & Techniques: C# & Windows GUI Application & Database Connectivity

I did this program in April 2007. It was an assignment for a class that I was taking at the time.

Screenshots: (Click for full size)
School Database School Database

Sample Code:

private void courseNamebtn_blank_Click(object sender, EventArgs e)
{
     courseNamebtn_blank.Hide();
     courseNamebtn_asc.Show();
     if (courseIDbtn_blank.Visible == false)
     {
          courseIDbtn_asc.Hide();
          courseIDbtn_des.Hide();
          courseIDbtn_blank.Show();
     }
     else if (courseCreditsbtn_blank.Visible == false)
     {
          courseCreditsbtn_asc.Hide();
          courseCreditsbtn_des.Hide();
          courseCreditsbtn_blank.Show();
     }
     else if (courseHPWbtn_blank.Visible == false)
     {
          courseHPWbtn_asc.Hide();
          courseHPWbtn_des.Hide();
          courseHPWbtn_blank.Show();
     }
     else if (courseDescriptionbtn_blank.Visible == false)
     {
          courseDescriptionbtn_asc.Hide();
          courseDescriptionbtn_des.Hide();
          courseDescriptionbtn_blank.Show();
     }
     Sorted = false;
     while (Sorted == false)
     {
          Sorted = true;
          for (x = 0; x < CourseArray.Length - 1; x++)
          {
               if (CourseArray[x].CourseName.CompareTo(CourseArray[x + 1].CourseName) > 0)
               {
                    courseCourseID = CourseArray[x].CourseID;
                    courseCourseName = CourseArray[x].CourseName;
                    courseCredits = CourseArray[x].Credits;
                    courseHoursPerWeek = CourseArray[x].HoursPerWeek;
                    courseCourseDescription = CourseArray[x].CourseDescription;
                    CourseArray[x].CourseID = CourseArray[x + 1].CourseID;
                    CourseArray[x].CourseName = CourseArray[x + 1].CourseName;
                    CourseArray[x].Credits = CourseArray[x + 1].Credits;
                    CourseArray[x].HoursPerWeek = CourseArray[x + 1].HoursPerWeek;
                    CourseArray[x].CourseDescription = CourseArray[x + 1].CourseDescription;
                    CourseArray[x + 1].CourseID = courseCourseID;
                    CourseArray[x + 1].CourseName = courseCourseName;
                    CourseArray[x + 1].Credits = courseCredits;
                    CourseArray[x + 1].HoursPerWeek = courseHoursPerWeek;
                    CourseArray[x + 1].CourseDescription = courseCourseDescription;
                    originalPlacementTempValue = CourseOriginalPlacementArray[x];
                    CourseOriginalPlacementArray[x] = CourseOriginalPlacementArray[x + 1];
                    CourseOriginalPlacementArray[x + 1] = originalPlacementTempValue;
                    Sorted = false;
               }
          }
     }
     courseIDlb.Items.Clear();
     courseNamelb.Items.Clear();
     courseCreditslb.Items.Clear();
     courseHPWlb.Items.Clear();
     courseDescriptionlb.Items.Clear();
     for (int a = 0; a < CourseArray.Length; a++)
     {
          courseIDlb.Items.Add(CourseArray[a].CourseID);
          courseNamelb.Items.Add(CourseArray[a].CourseName);
          courseCreditslb.Items.Add(CourseArray[a].Credits);
          courseHPWlb.Items.Add(CourseArray[a].HoursPerWeek);
          courseDescriptionlb.Items.Add(CourseArray[a].CourseDescription);
     }
}

Link: School Database

Comments (0)   Leave a comment!



LIM

Language & Techniques: C++ & Console Application

I did this program back in May of 2002. My math teacher wanted a program that people could use to help them with how matrices work.

Screenshots: (Click for full size)
LIM

Sample Code:

int LimClass::myDeterminant(matrix Matrix)
{
	int determinant = 0;
	int x = -1;
	if(Matrix.numrows() > 2)
	{
		matrix Temp(Matrix.numrows()-1,Matrix.numrows()-1);
		for(int a=0;a= a)
		{
			col++;
			Temp[b][c] = Matrix[row][col];
			determinant+=Matrix[0][a]*x*Determinant(Temp);
		}
	}
	else
	{
		determinant = (Matrix[0][0]*Matrix[1][1])-(Matrix[0][1]*Matrix[1][0]);
	}
	return(determinant);
}

Link: LIM

Comments (0)   Leave a comment!



Calculator

Language & Techniques: Visual Basic & Windows GUI Application

I did this program in October of 2006. It was a project for my class at the time, the outline was to try to mimic the Windows Calculator completely, including any bugs you can find in the windows calculator. I really enjoyed working on this program as I am very avid in math as well, so it was fun to help program a calculator in a sense.

Screenshots: (Click for full size)
Calculator

Sample Code:

Private Sub NinBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NinBtn.Click
     If AnswerBox.Text <> "Cannot divide by zero." Then
          If StartNewNumber = True Or AnswerBox.Text = "0." Then
               If FromOper = False Then
                    OldOldNumber = OldNumber
                    OldCurrentNumber = CurrentNumber
                    OldResultNumber = ResultNumber
                    OldNumber = ""
                    CurrentNumber = ""
                    ResultNumber = ""
               End If
               If DecPushed = True Then
                    AnswerBox.Text = "0.9"
               Else
                    AnswerBox.Text = "9."
          End If
          Else
               If AnswerBox.Text.Length < 33 Then
                    If DecPushed = False Then
                         AnswerBox.Text = AnswerBox.Text.Substring(0,AnswerBox.Text.Length - 1) + "9."
                    Else
                         AnswerBox.Text += "9"
                    End If
               End If
          End If
          StartNewNumber = False
     End If
End Sub

Link: Calculator

Comments (0)   Leave a comment!



Student Database

Language & Techniques: Visual Basic & Windows GUI Application

I did this program back in November of 2006. It was an assignment for a class I was taking at the time.

Screenshots: (Click for full size)
Student Database Student Database Student Database

Sample Code:

Private Sub SNDA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SNDA.Click
     Dim Sorted As Boolean = False
     Dim TempFNVar, TempLNVar, TempSNVar, TempMajVar, TempPNVar, TempGPAVar
     As String
     Dim X As Integer
     Do While Not Sorted
          Sorted = True
          For X = 0 To TempArray.Length - 2
               If TempArray(X).StuNum < TempArray(X + 1).StuNum Then
                    TempFNVar = TempArray(X + 1).First
                    TempLNVar = TempArray(X + 1).Last
                    TempSNVar = TempArray(X + 1).StuNum
                    TempPNVar = TempArray(X + 1).Phone
                    TempMajVar = TempArray(X + 1).Major
                    TempGPAVar = TempArray(X + 1).GPA
                    TempArray(X + 1).First = TempArray(X).First
                    TempArray(X + 1).Last = TempArray(X).Last
                    TempArray(X + 1).StuNum = TempArray(X).StuNum
                    TempArray(X + 1).Phone = TempArray(X).Phone
                    TempArray(X + 1).Major = TempArray(X).Major
                    TempArray(X + 1).GPA = TempArray(X).GPA
                    TempArray(X).First = TempFNVar
                    TempArray(X).Last = TempLNVar
                    TempArray(X).StuNum = TempSNVar
                    TempArray(X).Phone = TempPNVar
                    TempArray(X).Major = TempMajVar
                    TempArray(X).GPA = TempGPAVar
                    Sorted = False
               End If
          Next X
     Loop
     searchResults.Items.Clear()
     For a As Integer = 0 To TempArray.Length - 1
          searchResults.Items.Add(TempArray(a).First + vbTab + vbTab + TempArray(a).Last + vbTab + vbTab + TempArray(a).StuNum +
          vbTab + " " + TempArray(a).Major + vbTab + vbTab + " " + TempArray(a).Phone + vbTab + " " + TempArray(a).GPA)
     Next
End Sub

Link: Student Database

Comments (0)   Leave a comment!



Book Store

Language & Techniques: C# & Console Application

I did this program in March 2007. It was an assignment for a class that I was taking at the time.

Screenshots: (Click for full size)
Book Store Book Store

Sample Code:

public static void AddCoffeeTableBook()
{
     String Title;
     String Author;
     Double Price = 0;
     Console.Clear();
     Console.WriteLine("Add a coffee table book");
     Console.WriteLine();
     Console.Write("Please input the title of the book: ");
     Title = Console.ReadLine();
     Console.Write("Please input the author of the book: ");
     Author = Console.ReadLine();
     do {
          Console.Write("Please input the price of the book: ");
          Price = double.Parse(Console.ReadLine());
          if (Price < 35.00 || Price > 100.00)
          {
               Console.WriteLine();
               Console.WriteLine("The price must be between $35.00 and $100.00 inclusive");
               Console.WriteLine();
          }
     } while (Price < 35.00 || Price > 100.00);
     Console.WriteLine();
     Console.Write("Please press 'Y' to confirm adding this book: ");
     if (Console.ReadLine().ToUpper() == "Y")
     {
          TextBook NewBook = new TextBook();
          NewBook.SetAuthor(Author);
          NewBook.SetTitle(Title);
          NewBook.SetPrice(Price);
          NewBook.SetBookType("Coffee Table Book");
          Array.Resize(ref BookArray, BookArray.Length + 1);
          BookArray[BookArray.Length - 1] = NewBook;
          Console.WriteLine();
          Console.WriteLine("Book has been successfully added, press any key to go back to 
          the main menu");
     }
     else
          Console.WriteLine("Book has not been added, press any key to go back to the main menu");
     Console.ReadKey();
     PickChoices();
}

Link: Book Store

Comments (0)   Leave a comment!