Kindly find the solution of pre-release May/June 2016 scenario. The document contains, pre-release scenario, solution of each task using VB.NET programming and pseudocode with description, solution of whole pre-release scenario at once with description and without description.
[/et_pb_text][et_pb_code disabled=”off”]Visual Basic (V.B) Code For Pre Release Material 2017 of Computer Science
Module Module1
Sub Main()
Dim citizen, people As Integer
Dim total, cost_per_person As Single
people = 0
total = 0
cost_per_person = 0
Console.Write(“Enter numbers of senior citizens : “)
citizen = Console.ReadLine()
While citizen < 10 Or citizen > 36
Console.Write(“Error in output, Enter numbers of senior citizens in b/w 10 & 36 :”)
citizen = Console.ReadLine()
End While
If citizen > 24 Then people = citizen + 3 Else people = citizen + 2
If people >= 12 And people <= 16 Then
total = 150 + (14.0 * people) + (21.0 * people)
End If
If people >= 17 And people <= 26 Then
total = 190 + (13.5 * people) + (20.0 * people)
End If
If people >= 27 And people <= 39 Then
total = 225 + (13.0 * people) + (19.0 * people)
End If
cost_per_person = total / citizen
Dim name(39) As String
Dim amount(39) As Single
Dim seats, updated_people, c As Integer
Dim extra_amount, total_amount, amount_paid As Single
seats = 0
updated_people = 0
extra_amount = 0
total_amount = 0
amount_paid = 0
For c = 1 To people
Console.Write(“Enter the name of person on the outing : “)
name(c) = Console.ReadLine()
Console.Write(“Enter the amount paid by the person : “)
amount(c) = Console.ReadLine()
amount_paid = amount_paid + amount(c)
Next
If people >= 12 And people <= 16 Then
seats = 16 – people
End If
If people >= 17 And people <= 26 Then
seats = 26 – people
End If
If people >= 26 And people <= 39 Then
seats = 39 – people
End If
updated_people = people
If seats >= 1 Then
updated_people = people + seats
For d = c To updated_people
Console.Write(“Enter the name of person on the outing : “)
name(d) = Console.ReadLine()
Console.Write(“Enter the amount paid by the person : “)
amount(d) = Console.ReadLine()
amount_paid = amount_paid + amount(d)
Next
End If
For c = 1 To updated_people
Console.WriteLine(“The Citizens’ Name :” & name(c) & ” and the amount paid : ” & amount(c))
Next
Dim profit As Single
profit = amount_paid – total
If profit > 0 Then Console.WriteLine(” The Profit Gained : ” & profit) Else Console.WriteLine(“The Break Even Point Value : ” & total)
Console.ReadKey()
End Sub
End Module