Professional Documents
Culture Documents
Rubric ST23 - Take Home Practical
Rubric ST23 - Take Home Practical
Rubric ST23 - Take Home Practical
btnProcess.Visible = false; (0.5 for back colour, 0.5 for button visible)
if (int.TryParse(txtAge.Text, out int age) && age >= 18 && age <= 36)
(1 mark for for using int.tryparse in an if clause and correct arguments of tryparse)
{
decimal fund = 0m;
if (rdoYes.Checked)
{
fund = BASE_FUND + 25000;
(1 mark for .checked property for both radio buttons , else 0)
(1 mark adding correct amount to base fund – half for rdoYes and half for rdoNo )
}
else if (rdoNo.Checked)
{
fund = BASE_FUND + 40000;
}
else
{
MessageBox.Show("Please indicate whether you have received funding before or not");
(0.5)( (1 mark for the else, otherwise people get away with not selecting radio
button )
}
if (lstChoice.SelectedIndex !=-1)
(1 mark for using selected index property and it not being less than 0)
{
employmentType = lstChoice.SelectedItem.ToString();
(selected item property correctly used with tostring method and result saved in variable)
switch (employmentType)
(1 mark for keyword with result that is selected from Choicelistbox, as text expression)
{
case "Employed - Full time": yearsFunded = 3; break;
case "Employed - Part time": yearsFunded = 3; break;
case "Unemployed": yearsFunded = 3; break;
case "Self-employed": yearsFunded = 4; break;
case "Entrepreneur": yearsFunded = 5; break;
case "Tenderpreneur": yearsFunded = 3; break;
default: MessageBox.Show("Please select the relvant employment type");break;
(2 marks for all cases 100% correct, 1 mark if atleast one is not incorrect, 0.5 if 2 or
less are correct)
}
int count = 1; (1 mark for create and initialize counter variable outside loop)
decimal totalFund = 0m;
lstOutput.Items.Add("Funding application receipt for " + name + ":");
lstOutput.Items.Add("");
(save random result in int variable, call next method, generate atleast 100 possible 6digit
results ) = All or nothing
lstOutput.Items.Add("Funding for year " + count + " will be " + fund.ToString("c") + " with payout reference: " +
receiptNum);
lstOutput.Items.Add("");
totalFund += fund; (update the total fund each iteration in the loop)
}
else
{
MessageBox.Show("Please select the relevant employment type");
}
}
else
{
MessageBox.Show("Your age disqualifies you, you muste be between 18 and 36");
{
this.Close();
}
}
}
StreamWriter skryf; (0.5 for object and 0.5 for closing file (below)
( appropriate and effective method used to write items from listbox to a file)
}
skryf.Close();
}
}