Unit you can see all the functions, inputs and

Unit 16 assignment
2 Airline Company code

 

 

Task 1: To design a procedural application to meet
defined requirements

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

 

print(“===================Welcome to the Airplane
Company code===================”)

 

total_price=0

yes=0

seats=152

if help:

    response =
input(“Please Type yes for help: “)

else:

   
print(“”)

 

help=’yes’

while help==’yes’:

   
print(“Note: There are only “,seats,” available
seats”) #to warn/show the user how many seats are available

 

   
print(“Note: An adult ticket costs £120 and a child ticket costs
£60”)

 

 #input capacity of
152 seats available

 

   
adult=int(input(“Can you Enter the number of adult seats
required”))

   
child=int(input(“Can you Enter the number of child seats
required”))

   
session=adult+child

 

    if
session>seats: #the user is imformed that it cannot be more than 152 or less
than 0

         
print(“The plance is ovesrbooked”)

          continue

 

 

   
tseats=adult+child

   
seats=seats-tseats

   
adultcost=adult*120

   
childcost=child*60

    total_price=adultcost+childcost

    print(“The
adult cost is “,adultcost)

    print(“The
child cost is “,childcost)

    print(“The
total_price is “,total_price)

   
print(“Total number of seats sold for this session”,tseats)

 

 

 

   
op=str(input(“type ‘yes’ to continue to book more tickets or ‘no’
to stop booking tickets”))

    #user is asked
to loop the code if needed to repeat for another person

 

 

 

 

print(“==============This is  a final summary of your
tickets==============”)

 

 

#now the code has ended and there is no more loop so the
code has ended     

 

 

 

 

 

 

 

 

(Task 1a)

Data Table J

Ø 
This data table shows the name, type of data it
is (whether it being integer, float, Boolean or string) and the value which has
been assigned to it. As shown above you can see all the functions, inputs and
outputs of my code. This data table can also be used for testing as one can
input random numbers into the data table and the compare it with the code to
see if it matches with the correct outputs. In the code above me, is a screen-shot
version of my code that I mad for my unit 1 assignment 2 Airline Company code.
There are many tools and data types that I have used in order to make a
procedural application. I used tools such as the data types i.e. float, string
and I also used in my code some “else”, “elif” statements and also to top it
off some loop statements. I have done all of this in order to make sure that my
procedural programme had all of its criteria’s which I was given to make an
applicable airline company code and I also used this to further expand my
knowledge and to make sure that my code ( instead of hundreds of lines of code)
is not lengthy to make sure that it is firstly visible and clear to see and to
all make sure it looks appealing to people who have never used my code and it
also is an opportunity for me to easily spot any mistakes which might of
occurred in my code.

 

 

 

(Task 1b)

To justify the choice of tools and techniques used in the
Airline Booking application

During my code, I used different tools and techniques used
in the airline booking application such as using parameters and or even while
statements to show possible conditions which have to be set when booking an
airplane ticket. I used while and if/else statements as if need to express to
the user possible outcomes if for some reason the booking seats where either
too much or too little (over 152 less than 152). I also used certain types of
data types such as string, Boolean and inputs to input function list them or
even define with it could be true or false.

As you can see in this picture it shows that when I used my
if statement it expresses clearly that that seats must be equal or less than 15
and/or the seats must be equal yet bigger than 0. If the user was to somehow
not meet the codes requirements it will immediately display an error message as
it did not meets its terms ultimately resulting in the code not working.

 

If session>seats: #the user is informed that it cannot
be more than 152 or less than 0

          print
(“The plane is overbooked”)

          continue

 

 

 

 

(Task 2a)

To see if the
program has been implemented in the plane and to be able to use different tools
to develop our program

In my program of code I took into account that it could
either be successful of unsuccessful as there might be an error or a mistake in
my code. Having a mistake in my code is a great asset to me as I am able to
prevent that mistake from happing again and also learn from it. To make sure my
code actually work s I have to check and run the code to see any errors
however, if for some reason my plane is overbooked, I have to be able to
utilize different techniques to help prevent the overbooking mistakes. In order
to do these, in my program I decide to use further techniques such as continue
and break.  What continue and break does
in any code has the ability to return or loop to the beginning of the while
loop and what break does is literally break the codes and breaks the loop to go
on to the next line of code.

 

 

 

(Task 2b)

To produce test
plans using a standard test template to check the validity of the calculations
of your programmed solutions.

 

Here is my test plan to check the validity of my correct
calculations of my Airplane Company code:

 

 

(Task 3a)

To analyse actual test results against expected results
to identify discrepancies

 

In the previous task, (testing in P5) I was asked to produce
test plans in order to check and validate my calculations where similar to my
actual code. I did this to identifier discrepancies (similarities) and I also
did this to analyse, check and infer the information and process it to have an accurate
result plan of both my code and my test plan. It can also be a way to check my
work was accurate as it has the necessary information like data types functions
and can be a checklist to check what I did right to make a good airplane company
code. In this task however I am asked to analyse the results and compare actual
results from P5.

From what I can see the differences from my testing table
and my code is that on test 2 the result seems to have been exceeding the
amount of passengers which are able to board on the plane. Having more than 160
seats is far too much for the whole capacity of the plane. This ultimately
means that my code will immediately stop as it sees this information because it
does not meet its requirements which are only holding 152 passengers. To
prevent this from happening, I should have kept the data table as reliable as
possible to like real life situations i.e. average number family holiday trips.
In this case it was a matter of a test to show possible outcomes and a way for
me to learn from my mistakes and to prevent getting a total number amount over
152 passengers/seats. On top of all that, the testing data table is clear and
easy to understand as on the margin side it clearly present the amounts of test
I have and on the top it consists of the total amount of adult and child seats
and cost, total amount of seats for both and additionally the cost for adult
and child and the total price for both, which I find is very important and
reliable information when using a testing table.

For my final
conclusion, I find that there are obviously some problems highlighted in my
testing table as some people might not make out or able to understand what the
words on the top are saying. Also the testing table could also be bigger for
anyone who especially has problems who can’t see small text very well.

 

 

(Task 3b)

To evaluate a procedural application

In p5 I was asked to produce test plans in order to check my
calculations were right by using the application software Microsoft excel and
idle python. I think that both applications were satisfactory as they both
clearly presented the outcomes and it was clearly and easy to read for both
applications. In the software Microsoft excel, in the screen shot above, it
shows a detailed and easy to read graph of the Airline company code checklist.
This is very useful specifically for data handling as it contains of columns
and rows which python idle lacks of. This Is one major advantage for Microsoft
excel as it shows all the content necessary for making sure that your code has
all that it needs to be a successful procedural application. However one major
disadvantage of Microsoft excel is that it lacks the content of actually
executing a python program as it is not the type of software to code and print
out variables. On the other hand python idle, (also known as Integrated
Development Environment or Integrated Development Learning Environment) is
manly used for the fundamentals of coding which is a python programming
language. This makes python specifically used for handling code and printing
out function of code. What I found good about the software python idle, is that
it had a very clear outcome and easy to read for luring out and identifying any
mistakes or syntax errors. Overall, I found that using python was better at
coding and processing/printing out the code however using Microsoft excel it
was a good source for data handling.

 

 

(Task 4a)

To create an on-screen help to assist the users of a
computer program.

In this task I was asked to create on (python idle) a screen
help which assist the users in case if they had trouble had buying tickets.
This insured that the customers made it easy to handle when using my code for
the first time. It also aids as it is efficient and easy to create to prevent
any causalities when coding in python. An on Screen help manual can be useful
to people who have no idea/clue about your code and it is a great way for help
and a navigation tool for people who need help or have no backstory to coding.
In python programming there consists of a total of seven different types of
help assist manuals which are:

Ø 
Wizards

Ø 
“Helpers”

Ø 
On-screen book type help

Ø 
On-Screen videos

Ø 
HTML-help

Ø 
Interactive tutorials

Ø 
And the Usual “Help” button

An on screen manual is another way of an easy way for people
to be assisted with my computer programs. The advantages of having an on screen
help assist on my code is that it is easy to access in any program, very
visible with or without any highlighted words which stand out in your program,
usually very cheap and accessible to use and the most important thing any users
want is that it is totally free of charge. However, the disadvantages of using
a screen help assist in python programming is that at times it could be
difficult to take a screen shot of the font without the bitmaps to be reduced,
the users are also required to actually have a computer system which has to
also contain a “reader programme”.

Down below shows how I had created an on screen help assist
for the users:

 

print(“===================Welcome to the Airplane
Company code===================”)

 

total_price=0

yes=0

seats=152

if help:

    response =
input(“Please Type yes for help: “)

else:

    print(“”)

 

help=’yes’

while help==’yes’:

    print(“Note:
There are only “,seats,” available seats”) #to warn/show the
user how many seats are available

 

    print(“Note:
An adult ticket costs £120 and a child ticket costs £60”)

 

 #input capacity of 152
seats available

 

   
adult=int(input(“Can you Enter the number of adult seats
required”))

   
child=int(input(“Can you Enter the number of child seats
required”))

    session=adult+child

 

    if
session>seats: #the user is imformed that it cannot be more than 152 or less
than 0

         
print(“The plane is overbooked”)

          continue

 

 

    tseats=adult+child

    seats=seats-tseats

    adultcost=adult*120

    childcost=child*60

   
total_price=adultcost+childcost

    print(“The
adult cost is “,adultcost)

    print(“The child
cost is “,childcost)

    print(“The
total_price is “,total_price)

    print(“Total
number of seats sold for this session”,tseats)

 

 

 

   
op=str(input(“type ‘yes’ to continue to book more tickets or ‘no’
to stop booking tickets”))

    #user is asked to
loop the code if needed to repeat for another person

 

 

 

 

print(“==============This is  a final summary of your
tickets==============”)

 

 

#now the code has ended and there is no more loop so the code
has ended     

 

 

(Task 4b)

To create technical documentation for the support and
maintenance of a computer program.

In this task I am required to write a technical
documentation for which is relatable to the maintenance of my computer program
the airplane Company code. For this task for my airline company code it has to
be easy to understand, clear and it has to also be very accurate information
being told.  To support my computer
program, I have to be able to set rules when coding, so that means I have to
make sure that the user should be properly informed when using my code and it
should be easy to understand when reading and taking all the steps. I have to
be able to amend my code by adding in some comments in the side and adding in
more print statements so the user can read the exact steps one by one. I also
have to consider maintaining the computer program code. What I mean by this is
that I have to make sure my code does not have too much information so that the
user does not lose track and to also prevent any errors in my code. In order to
perform this task I have been asked (in the previous tasks) to create something
called an on-screen help assist. This main function is to specifically help the
users in my code and to guide them to put them on the right track if they do
not understand my code. The advantage of this is that it insures full
dedication and concentration, easy manouvering around my code, easy to access
it with a few clicks and the most beneficial one is that it is completely free
of charge. Moreover another technical documentation for the support and the
maintenance of my computer system is to use (which I have already used in my
program) modularity in programming. Modularity in programming is the process where
multiple programs are broken up into smaller separate sub-programs. In my
airline company code, modularity plays a big role as it specifically has its
job to separate software components by using something called (OOP) which in
other terms means Object oriented programming. OOP also known as object oriented
programming is an alternative compact ability file in the modular programme. The
advantages of using both OOP and Modularity are that it will result in the programme
to be more stable and maintained and it can additionally handle many programmes
which are on different modules. Another advantage to OOP is that OOP gives the
chance to easily access tools from the user interface which is really beneficial
in both modularity and in my programme. Lastly, another advantage of modularity
is that it is easy to resist (debuggable) and can be used repeatedly in other programs
and it can at times be presented clearly which can help and show awareness for
the user to identify and correct any mistakes when in programming.

 

 

x

Hi!
I'm Joan!

Would you like to get a custom essay? How about receiving a customized one?

Check it out