O level Computer science Pre-release Material May/june 2017

0
[et_pb_section transparent_background=”off” allow_player_pause=”off” inner_shadow=”off” parallax=”off” parallax_method=”on” padding_mobile=”off” make_fullwidth=”off” use_custom_width=”off” width_unit=”off” custom_width_px=”1080px” custom_width_percent=”80%” make_equal=”off” use_custom_gutter=”off” fullwidth=”off” specialty=”off” admin_label=”section” disabled=”off”][et_pb_row make_fullwidth=”off” use_custom_width=”off” width_unit=”off” custom_width_px=”1080px” custom_width_percent=”80%” use_custom_gutter=”off” gutter_width=”3″ padding_mobile=”off” allow_player_pause=”off” parallax=”off” parallax_method=”on” make_equal=”off” column_padding_mobile=”on” parallax_1=”off” parallax_method_1=”on” parallax_2=”off” parallax_method_2=”on” parallax_3=”off” parallax_method_3=”on” parallax_4=”off” parallax_method_4=”on” disabled=”off”][et_pb_column type=”4_4″ disabled=”off” parallax=”off” parallax_method=”on” column_padding_mobile=”on”][et_pb_text background_layout=”light” text_orientation=”left” use_border_color=”off” border_style=”solid” disabled=”off”]

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”]

Download File
[/et_pb_code][/et_pb_column][/et_pb_row][et_pb_row make_fullwidth=”off” use_custom_width=”off” width_unit=”off” custom_width_px=”1080px” custom_width_percent=”80%” use_custom_gutter=”off” gutter_width=”3″ padding_mobile=”off” allow_player_pause=”off” parallax=”off” parallax_method=”on” make_equal=”off” column_padding_mobile=”on” parallax_1=”off” parallax_method_1=”on” parallax_2=”off” parallax_method_2=”on” parallax_3=”off” parallax_method_3=”on” parallax_4=”off” parallax_method_4=”on”][et_pb_column type=”4_4″ parallax=”off” parallax_method=”on” column_padding_mobile=”on”][et_pb_text background_layout=”light” text_orientation=”left”]

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

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]

LEAVE A REPLY

Please enter your comment!
Please enter your name here