Tuesday, September 21, 2010

Programming Assessment Task Documentation

Introduction
(Replace this with: What is the purpose or problem that the program is trying to solve

The purpose of the program Visual Basic is to work with the code I have given and make sure that there are no errors and to warn the user if there are any, if not it should me that the game you have created should work fine due to no errors in typing or statements.
In my case its duty is to see who wins the game I created of noughts and crosses. The game has been made to only for two players. Once the decision on players has been final, the game begins by the "Player Turn" presenting which player will begin whether its "X" or "O".
The game will continue and until the result ends with one player as the winner or a tie.
A small notification will appear finalising the winner of that round. To keep score that winning player will then recieve a tally/ number next to their "X" or "O" to represent that they have one a round and it will continue until the players decide to end the game.
Once the round is over, the player(s) must clickon the restart button for the game to begin again and the "Player Turn" will switch over to the opposite player, so there are equal turns on which player begins the game!

Algorithm Outlining the Program
(Put your flow chart here)


Explanation of Data Types used

(What types are used in the variables in your program and where? Remember the DIM statement)

(not complete!!)

Tic Tac Toe Game Done!!!

Last lesson, I completed my term 3 IST assignment which was to create our own game on Visual Basic.
I researched and watched different tutorials to help me understand the process of making the game including the form, the buttons, labels and then the code and making the game work.
Once the actual game was done I decorated it, so that it wouldn't look plain, I added a background of a purple flower and then changed the colour of the fonts, font sizes etc.
All I have to now is upload the game to a document and finish off my theory and then I am done!! =P

Wednesday, August 25, 2010

Hi LO Guessing Game

Study the code below;

Public Class Form1
Dim secretnum As Integer = Int (10 * Rnd() ) + 1


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text <>Then TextBox2.Text = "higher"
If TextBox1.Text > secretnum Then TextBox2.Text = "lower"
If TextBox1.Text = secretnum Then TextBox2.Text = "correct"
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Randomize ()
Secretnum = Int (10 * Rnd() ) + 1
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
End Class


Answer the following:
1. How many objects are referred to? What are they?
2.What is the name of the variable referred to?
3. What are the three text options that appear in textbox1?
4. What do you think this code does?
5. Build this code into a project and get it to work!!


Simple Timer

Simple Timer
The timer object is quite simple to use. It is an invisible object that runs in the background of a form. The timer has one event, a timer event occurs every time the time interval expires.

For example if you set the timer interal to 1000(1 second), then every second a timer event will occur. You can code what happens when the timer event is triggered, just make sure the timers enabled property is set to true.

For Example:
Define a variable in the form-
Dim clock as integer

Place the following code in the timer event
clock=clock+1
label1.text=clock

You could add two buttons, one to start the timer and one to stop the timer. Starting the timer would involve setting the "clock" variable to 0 and the timer enabled property to true. Stop the timer simply involves setting the timer enabled property to false.

Tuesday, August 17, 2010

Variables

Variables are "containers" for values that can be used by a program. Variables can contain numbers or text. Variables are given names so they can be referred to in the programming code.

Today, I will create three variables, one called "point", one called "number", and one called "name".

Program used: Microsoft Visual Basic
Once I had a new form, I had to add three buttons from the toolbox to the form and change the names from:
* Button1 to Whole Number
* Button2 to Decimal Number
* Button3 to Name
I then added 3 Labels one beside each of the buttons and then a text box below the Name button.

I then changed the codes for the buttons:
Private Sub Button1_Click (ByVal sender As System. Object, ByVal e As System. EventArgs)
Handles Button1.Click
number = Rnd ()
Label1.Text = number
End Sub


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System. EventArgs)
Handles Button2.Click
point = Rnd ()
Label2.Text = point
End Sub

Private Sub Button3_Click (ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
myname = TextBox1.Text
Label3.Text = myname
End Sub

The following are the screenshots of my end result for this class task.
T
he first screenshot is of the codes which is what makes the program run.
The second screenshot is of the actual program/form that I made.

Control Structures-Repitition

During class we all had a choice to pick a topic to research, so we could talk about it to everyone next lesson I chose Control Structures Repitition. The following is what I found:
This type of control structures specify a block of one or more statements that are repeatedly executed until a condition is satisfied. These are also called iteration control structures.
There are three different ways that a set of instructions can be repeated, and each way is determined by where the decision to repeat is placed:
-at the beginning of the loop (leading decision loop)a
-at the end of the loop (trailing decision loop)
-a counted numberof times (counted loop)
1. Leading Decision Loop:
In such loops the testing of the condition is at the beginning of the loop. Examples are DO-WHILE loops. The only way to terminate the loop is to render the DO-WHILE loop false.
2. Trailing Decision Loop:
In such structures the testing of condition is done at the end of loop except that the logic to keep on repeating is same as in case of other repitition structures. REPEAT...UNTIL is an example of trailing decision loop. In trailing loops the statems ase executed at least once before the condition is tested. These loops are sued in almost all kinds of computer program e.g. to print student records, to continue taking imput until a certain limit etc.

3. Counted Loop:
These are also known as DO or FOIR loops. In such kind of repitition structures the programmer knowns in advance the exact number of loop iterations. The loop execution is controlled by an important variable called the loop index. We can now conclude that selection control structures and repitition control structures find their use in almost any application. Ising them wisely and judiciously depends on the person who is going to use these loops. Proper implementation of loop structures can reduce program complexity and cost a lot.

Some problems require a sequence of tasks to be processed repeatedly, e.g.:
-apply same processing to a set of different data items
-processing until and target point is reached
A block of statements that are to be repeated
-A condition that will determine if the loop processing should stop
-The condition is evaluated once in each iteration
-A variable that will change each time the loop is processed
A variable that will change each time the loop is processed
-tested in the condition
The following image is a visual, an example for you to see what is meant by "the loop" or repitition in a simple flow chart like this.



Tuesday, August 10, 2010

Heads & Tails

Last Wednesday on August 4, we had a task called heads & tails where we had to run the program Microsoft Visual Basic, and create a new project with a form. Then we had to drag the label, button and text box from the toolbox to the form and change the name/property from BUTTON1 to CHECK and then edit the code for the label by inserting
If TextBox1.Text = "heads" Then Label1.Text= "win"
If TextBox1.Text = "tails" Then Label1.Text = "lose"
So then when you type heads into the text box the label at the top of the form will say win, and then if you type tails into the text box the label will say lose.









Thursday, June 3, 2010

Internet and Website Development

The following is the MAIN parts of our task and what is mostly expected of it...

Design and Layout:
- The website must consist of multiple pages and be contained in an appropriate file structure.
- The website will have an interactive menu system that allows users to navigate your site.
- The home page will have an industry standard name.
- The web pages will be optimized for a specified resolutionand this advice will be conveyed to
the viewer.

We must storyboard our website,(in a word document) and hand in our completed task to Mr. Lennon on CD on its due date which is June 23rd, week 10, Term2.

Term 2: IST Assignmmment Plan

Create an appropriate folder
*create folders
folder*website*
inside;
-defaulthtml
-menu
-etc
folder*images*

Have an interactive menu
-1024x768 webpage resolution

Downloading a music file just link it to an mp3 file

This task is DUE on the first IST lesson of week 10, which will be June 23rd 2010, Wedesday.

Tuesday, June 1, 2010

=)

Header: forms the top, edge, head, or font something, mostly for a certain section of a page or a the title of a paragraph etc.

Title: names or identifies films, novels, poems, plays or other literary work.

Body: the main section of a writing.

Define HTML!!

HTML(hypertext mark-up Language) is a set or mark-up symbols sodes inserted in a file intended dor display on a world-wide web browser page.

Basic HTML :)

We have been shown how to make a basic web page using notepad, we did drafts so the pages didn't have to have proper information on it, this was just to help give us the idea on how simple it is to make a basic web page. To customize or add extra features to your web page you need to add tags from this "html site".
My webpage is simple with a few headings, where I changed the size and colour of the fonts, you can also add a background or add colour to the page, you can also add images and highlight words.

Defintions =)

Protocol: is a set of rules governing the format of messages that are exchanged between computers.

FTP: (File Transfer Protocol), allows file transfer between two computers with a login required.

http: (Hypertext Transfer Protocol), is used to transmit HTML pages.

Tuesday, February 16, 2010

Database-Task 2

Define:
Field:
Fields are the columns in databases. They contain a piece of specific information from a record.
Record: A record is is the type of information about a person. e.g phone number, address....
File: Is made up by both record and field
Query: Is the system that give you the blank spot that lets you fill in the fields.
Database: Is a collection of information put together by fields, records and files.
Report: A formatted amd organized presentation of data.
DBMS: (database management system) a collection of programs that enables you to store, modify and extract information from a database.
Data: Distinct pieces of information, usually formatted in a different way.

Examples of commonly used databases: *Search engines; such as google. *School software; contains data such as student name, class, etc. *Libraries; contains books, authors, etc. *iPod; artist, song, year, etc. *Mobile contacts; numbers, name, etc. *Business operations; (such as post offices), place, type, weight, etc.

Wednesday, February 3, 2010

Database...

1. I know there is a computer shop in the main street of Katoomba (Katoomba St), but I don't know its name. See if you can find the number for me.

The number is 122, called the Bennett Office Supplies.

2. Sally lives in Merrylands on Fowler Rd, and she wants to know the closest florist to where she lives. Help her out (see if you can get her a map).












3. You want the phone numbers of some motels in Noosa, QLD. But of coarse your phone book only has NSW numbers?

This is an example of the results you can get from the Yellow Pages, when searching for a person and/or place.

Databases!!!

The following logos are the two examples of websites that are known as databases. Both the yellow pages and the white pages provide information/contact details for anyone to search.





Tuesday, February 2, 2010

Database

The first topic for this term is Database!!!
A database is a tool for collecting and organizing information about people, products orders and more. For example the yellow pages and white pages are databases because they are a collection of data and are organized into different categories so it is easier for us to search for information. You can think of a database as an electronic filing system, something where you can save things like peoples contact details, addresses, notes, post codes and more!!

ist 2o1o

Heyy,
Welcome to my new ist blog for 2o1o, you'll see a lot more of ist work this year so enjoyy reading!!!