Friday, May 8, 2009

Amit's Assignment Part 2 - notes

Hi All,

FYI, I'll write some notes for Amit's assignment Part2.
If you have another notes, please post a comment.

And did someone get the correct information from MS Licence Advisor?
I'm not done yet...:P I am still studying the types of licence.
It is complicated for me, don't you think...?

Misa
------------------------------------------------------------------
[MS Licence Advisor]

- Use "IE".
- Select "United States" for country.
(You need to convert the currency from US$ --> AUS$ later.)


[Assignment clarifications by Amit]

- Check this page.
http://sielearning2.tafensw.edu.au/moodle/mod/forum/discuss.php?d=840#p1601


[ROI]

Amit said 2 things in last class...
-You should calculate only last year's cells for ROI.
-You should use percentage format for ROI.
(This is not assignment sheet...)








ROI (Total)= (Cumulative benefits - Cumulative costs) / Cumulative costs
73.19% = ($827,557 -$477,823) /$477,823
ROI (Annual)=ROI (Total)/ number of years
12.20% = (73.19%) / 6
------------------------------------------------------------------

Thursday, May 7, 2009

Allan's Classwork - Employee class

Just change the following codes to the Employee class file:



//methods
public double CalcWages(double hw)
{
double wages = hw * payRate;
return CalcTaxes(wages);
}

private double CalcTaxes(double Wages)
{
return (Wages * 0.85);
}

Wednesday, May 6, 2009

Amit's Assignment Part 2 - Economic Feasibility

Hey guys

Is it a typo or just me?
In part 2 - Economic Feasibility, it says:
"the benefits per month are expected to be $50,000 ...".
First, $50K a month is a lot of money and seems very unrealistic.
Second, that would mean the company would make $120,000 a year, only by selling flowers with an Internet connection and 11 computers.

I think what he really meant was "benefit per year". That would be more plausible. Whaddya reckon?

Shanti's Web Classwork

Question 1 - Countdown


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script type="text/javascript">

var num = prompt("Enter number > 0", "0");

while ((num <=0) || (isNaN(num)==true))
{
var num = prompt("Enter number > 0", "0");
}

for (var i=0; i<num; i++)
{
alert("Starting in " + (num-i));
}
alert ("Roll Film!");
</script>
</body>
</html>

Question 2 - Multiplication


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script type="text/javascript">
document.write("<table><tr><td colspan=10><h1>Multiplication Table</h1></td></tr>");

for(var i = 1; i <= 10; i++)
{
document.write("<tr>");
for (var j = 1 ; j <= 10; j++)
{
document.write("<td>" + i + " * " + j + " = " + (i * j) + "</td>");
}
document.write("</tr>");
}


document.write("</table>");
</script>
</body>
</html>


Question 3 - Online Reservation



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script type="text/javascript">
function assignSeat()
{

for (var i = 1; i <= 5; i ++)
{
if (document.getElementById(i).title == "a")
{
document.getElementById(i).src= "seat_select.png";
if (confirm("Seat " + i + " is available. Accept? "))
{
document.getElementById(i).src = "seat_unavail.png";
document.getElementById(i).title = "u";
break;
}
else
{

}
document.getElementById(i).src= "seat_avail.png";
}
}

}
</script>

<img src="seat_avail.png" alt = "1" id="1" title = "a" />
<img src="seat_avail.png" alt = "2" id="2" title = "a" />
<img src="seat_avail.png" alt = "3" id="3" title = "a" />
<img src="seat_avail.png" alt = "4" id="4" title = "a" />
<img src="seat_avail.png" alt = "5" id="5" title = "a" />
<br />
<input type="button" value="Reserve Seat" onclick="assignSeat()" />

</body>
</html>

Monday, May 4, 2009

Shanti's Classwork - Rectangle Class

Code without the implementation for the Point object.
Class Definition for Rectangle:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RectangleClass
{
class Rectangle
{
//fields
private int length = 0;
private int width = 0;

//properties
public int Length
{
get { return length; }
set { length=value; }
}
public int Width
{
get { return width; }
set { width = value; }
}

//constructors
public Rectangle()
{
}
public Rectangle(int _length, int _width)
{
length = _length;
width = _width;
}

//methods
public int getArea()
{
return length * width;
}

public int getPerimeter()
{
return (length + width) * 2;
}

public void increaseLength(int _lengthIncrease)
{
length = length + _lengthIncrease;
}

public void increaseWidth(int _widthIncrease)
{
width = width + _widthIncrease;
}
}
}


UI Form



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RectangleClass
{
public partial class Form1 : Form
{
Rectangle myRec1 = new Rectangle(0, 0);

public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void btnGetLength_Click(object sender, EventArgs e)
{
CheckFields();
MessageBox.Show("Length is " + myRec1.Length);
}

private void btnGetWidth_Click(object sender, EventArgs e)
{
MessageBox.Show("Width is " + myRec1.Width);
}

private void btnArea_Click(object sender, EventArgs e)
{
MessageBox.Show("Area is " + myRec1.getArea());
}

private void btnPerimeter_Click(object sender, EventArgs e)
{
MessageBox.Show("Area is " + myRec1.getPerimeter());
}

private void CheckFields()
{

if (txtLengthInc.Text != "")
myRec1.increaseLength(int.Parse(txtLengthInc.Text));
if (txtWidthInc.Text != "")
myRec1.increaseWidth(int.Parse(txtWidthInc.Text));

if (txtLength.Text != "")
myRec1.Length = myRec1.Length + int.Parse(txtLength.Text);
if (txtWidth.Text != "")
myRec1.Width = myRec1.Width + int.Parse(txtWidth.Text);

}


}
}

Saturday, May 2, 2009

Amit's Q1.4 What other options...

Apart from Web-based and Stand-alones...

Any idea?

Assignment Cover

Hi guys

Does anyone know where I can find the cover for Amit's assignment? A link would be welcome. Please post it as a comment to this post.

Thanks!

Denis