SlideShare a Scribd company logo
Exam Preparation Day
QUESTION 6 โ€“ APPLICATION PROGRAMMING
Read the following scenario.
Adelaide Show grounds, is considering changing from a paper-based ride system to a
computer-based system, to ensure that customer taking rides can be serviced more
effectively and the company can determine . Below are an extract from the Rides
currently available.
(a) (i)
Identify and justify an efficient way of storing the prices for the rides.
The most efficient method depends on language used.
JavaScript: the most efficient way to store the prices is an object as this language
doesnโ€™t have associative arrays. The object could store name and number.
An ordinary array will work, as long as order of items in arrays is preserved for
searches.
VB has a similar issue. Here the most efficient way (advanced) is a new collection,
similar to a JS object. Ordinary arrays the same as JS
PHP has associative arrays, where names are used as indexes, rather than numbers.
(a) (ii)
When storing the information from part (i), discuss one potential output issue that will need to
be resolved when presenting information to customers.
Assuming arrays are used (JS, VB), order of product is important so that prices donโ€™t get
mixed.
Length of data is variable, so formatting is important.
Prices are stored as numbers, so formatting (eg $) important here as well
(b)
Write a function that will record the sales of a ticket to a customer.
Function StoreSales
Input Ride, Quantity
Validate by displaying, Y/N response
IF N return to input
Open SalesRecord array
Add quantity to RideNumber(Ride)
Close SalesRecord
Return
Pseudocode is often easier as there are no strict syntax rules. This does not mean good
programming practice such as meaningful variables and indenting should not be used.
(c)
Discuss the implications of distributing the application program as a source file
It is not a good idea if a commercial proposition, both for security of product (people
can easily change/wreck it) and also there is no protection of intellectual property, so
distributor could lose income.
On the other hand many do distribute files in this way (freely), asserting copyright if to
be used commercially, but able to deny responsibility if taken and used.
Read the following scenario.
Adelaide metro, is considering changing from a paper-based bus ride system to a
computer-based system, to ensure that customer taking bus rides can be serviced more
effectively when boarding a bus without a metro card. Below is an extract from the bus
fair and a suggested algorithm for developing a computer-based program.
(d) Identify the lines of code
(i) Pre-test loop
(ii) Fixed loop
(e) Condition in conditional loop
0 0 0 0
2 1
1 1 3 2
2 2 1 1
1 3 4 1
1 4 1 1
2 5 2 2
3 6 3 4
6 7 2 2
5 8 0
0
53.50
The total taken by the driver is $53.50
(g)
Explain how recommended practices and conventions can improve the validity of user input.
The code at present does not check whether the input value is as desired. One practice
is to reflect the two entries โ€“ type and number and ask for confirmation. Another is to
have a drop down list for the type of ticket, and a check that a number is actually
entered for quantity of tickets. Then reflect back for confirmation. Actually a drop
down list for number of tickets may also be a possibility.

More Related Content

Similar to Question 6 - 2k15 Exam Preparation Day

Advance Self Driving Car Using Machine Learning
Advance Self Driving Car Using Machine LearningAdvance Self Driving Car Using Machine Learning
Advance Self Driving Car Using Machine Learning
Associate Professor in VSB Coimbatore
ย 
Multiagent multiobjective interaction game system for service provisoning veh...
Multiagent multiobjective interaction game system for service provisoning veh...Multiagent multiobjective interaction game system for service provisoning veh...
Multiagent multiobjective interaction game system for service provisoning veh...
redpel dot com
ย 
IRJET- Cloud Cost Analyzer and Optimizer
IRJET- Cloud Cost Analyzer and OptimizerIRJET- Cloud Cost Analyzer and Optimizer
IRJET- Cloud Cost Analyzer and Optimizer
IRJET Journal
ย 
Removal Based Improved Replication Control and Fault Tolerance Method for Roa...
Removal Based Improved Replication Control and Fault Tolerance Method for Roa...Removal Based Improved Replication Control and Fault Tolerance Method for Roa...
Removal Based Improved Replication Control and Fault Tolerance Method for Roa...
IJCSIS Research Publications
ย 
Ethopian Database Management system as a Cloud Service: Limitations and advan...
Ethopian Database Management system as a Cloud Service: Limitations and advan...Ethopian Database Management system as a Cloud Service: Limitations and advan...
Ethopian Database Management system as a Cloud Service: Limitations and advan...
IOSR Journals
ย 
Bus 421 Research Paper
Bus 421 Research PaperBus 421 Research Paper
Bus 421 Research Paper
Crystal Torres
ย 
Software defined networking with pseudonym systems for secure vehicular clouds
Software defined networking with pseudonym systems for secure vehicular cloudsSoftware defined networking with pseudonym systems for secure vehicular clouds
Software defined networking with pseudonym systems for secure vehicular clouds
redpel dot com
ย 
Fast Synchronization In IVR Using REST API For HTML5 And AJAX
Fast Synchronization In IVR Using REST API For HTML5 And AJAXFast Synchronization In IVR Using REST API For HTML5 And AJAX
Fast Synchronization In IVR Using REST API For HTML5 And AJAX
IJERA Editor
ย 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
webscale
ย 
A Study on Replication and Failover Cluster to Maximize System Uptime
A Study on Replication and Failover Cluster to Maximize System UptimeA Study on Replication and Failover Cluster to Maximize System Uptime
A Study on Replication and Failover Cluster to Maximize System Uptime
YogeshIJTSRD
ย 
The Autonomous Driving Technology Stack
The Autonomous Driving Technology StackThe Autonomous Driving Technology Stack
The Autonomous Driving Technology Stack
Nitin Kumar, CMAA, CMC, CITM, iCEO
ย 
Efficient and reliable hybrid cloud architecture for big database
Efficient and reliable hybrid cloud architecture for big databaseEfficient and reliable hybrid cloud architecture for big database
Efficient and reliable hybrid cloud architecture for big database
ijccsa
ย 
Prediction of Used Car Prices using Machine Learning Techniques
Prediction of Used Car Prices using Machine Learning TechniquesPrediction of Used Car Prices using Machine Learning Techniques
Prediction of Used Car Prices using Machine Learning Techniques
IRJET Journal
ย 
Computer aided design, computer aided manufacturing, computer aided engineering
Computer aided design, computer aided manufacturing, computer aided engineeringComputer aided design, computer aided manufacturing, computer aided engineering
Computer aided design, computer aided manufacturing, computer aided engineering
university of sust.
ย 
Eitc team 1 of v3 annotated bibliography
Eitc team 1 of v3  annotated bibliographyEitc team 1 of v3  annotated bibliography
Eitc team 1 of v3 annotated bibliography
Jash Mehta
ย 
An Efficient and Fault Tolerant Data Replica Placement Technique for Cloud ba...
An Efficient and Fault Tolerant Data Replica Placement Technique for Cloud ba...An Efficient and Fault Tolerant Data Replica Placement Technique for Cloud ba...
An Efficient and Fault Tolerant Data Replica Placement Technique for Cloud ba...
IJCSIS Research Publications
ย 
IEEE Cloud computing 2016 Title and Abstract
IEEE Cloud computing 2016 Title and AbstractIEEE Cloud computing 2016 Title and Abstract
IEEE Cloud computing 2016 Title and Abstract
tsysglobalsolutions
ย 
Determining The Total Cost Of Ownership Of Serverless Technologies
Determining The Total Cost Of Ownership Of Serverless TechnologiesDetermining The Total Cost Of Ownership Of Serverless Technologies
Determining The Total Cost Of Ownership Of Serverless Technologies
Gary Arora
ย 
Google.Test4prep.Professional-Data-Engineer.v2038q.pdf
Google.Test4prep.Professional-Data-Engineer.v2038q.pdfGoogle.Test4prep.Professional-Data-Engineer.v2038q.pdf
Google.Test4prep.Professional-Data-Engineer.v2038q.pdf
ssuser22b701
ย 
CAR DAMAGE DETECTION USING DEEP LEARNING
CAR DAMAGE DETECTION USING DEEP LEARNINGCAR DAMAGE DETECTION USING DEEP LEARNING
CAR DAMAGE DETECTION USING DEEP LEARNING
IRJET Journal
ย 

Similar to Question 6 - 2k15 Exam Preparation Day (20)

Advance Self Driving Car Using Machine Learning
Advance Self Driving Car Using Machine LearningAdvance Self Driving Car Using Machine Learning
Advance Self Driving Car Using Machine Learning
ย 
Multiagent multiobjective interaction game system for service provisoning veh...
Multiagent multiobjective interaction game system for service provisoning veh...Multiagent multiobjective interaction game system for service provisoning veh...
Multiagent multiobjective interaction game system for service provisoning veh...
ย 
IRJET- Cloud Cost Analyzer and Optimizer
IRJET- Cloud Cost Analyzer and OptimizerIRJET- Cloud Cost Analyzer and Optimizer
IRJET- Cloud Cost Analyzer and Optimizer
ย 
Removal Based Improved Replication Control and Fault Tolerance Method for Roa...
Removal Based Improved Replication Control and Fault Tolerance Method for Roa...Removal Based Improved Replication Control and Fault Tolerance Method for Roa...
Removal Based Improved Replication Control and Fault Tolerance Method for Roa...
ย 
Ethopian Database Management system as a Cloud Service: Limitations and advan...
Ethopian Database Management system as a Cloud Service: Limitations and advan...Ethopian Database Management system as a Cloud Service: Limitations and advan...
Ethopian Database Management system as a Cloud Service: Limitations and advan...
ย 
Bus 421 Research Paper
Bus 421 Research PaperBus 421 Research Paper
Bus 421 Research Paper
ย 
Software defined networking with pseudonym systems for secure vehicular clouds
Software defined networking with pseudonym systems for secure vehicular cloudsSoftware defined networking with pseudonym systems for secure vehicular clouds
Software defined networking with pseudonym systems for secure vehicular clouds
ย 
Fast Synchronization In IVR Using REST API For HTML5 And AJAX
Fast Synchronization In IVR Using REST API For HTML5 And AJAXFast Synchronization In IVR Using REST API For HTML5 And AJAX
Fast Synchronization In IVR Using REST API For HTML5 And AJAX
ย 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
ย 
A Study on Replication and Failover Cluster to Maximize System Uptime
A Study on Replication and Failover Cluster to Maximize System UptimeA Study on Replication and Failover Cluster to Maximize System Uptime
A Study on Replication and Failover Cluster to Maximize System Uptime
ย 
The Autonomous Driving Technology Stack
The Autonomous Driving Technology StackThe Autonomous Driving Technology Stack
The Autonomous Driving Technology Stack
ย 
Efficient and reliable hybrid cloud architecture for big database
Efficient and reliable hybrid cloud architecture for big databaseEfficient and reliable hybrid cloud architecture for big database
Efficient and reliable hybrid cloud architecture for big database
ย 
Prediction of Used Car Prices using Machine Learning Techniques
Prediction of Used Car Prices using Machine Learning TechniquesPrediction of Used Car Prices using Machine Learning Techniques
Prediction of Used Car Prices using Machine Learning Techniques
ย 
Computer aided design, computer aided manufacturing, computer aided engineering
Computer aided design, computer aided manufacturing, computer aided engineeringComputer aided design, computer aided manufacturing, computer aided engineering
Computer aided design, computer aided manufacturing, computer aided engineering
ย 
Eitc team 1 of v3 annotated bibliography
Eitc team 1 of v3  annotated bibliographyEitc team 1 of v3  annotated bibliography
Eitc team 1 of v3 annotated bibliography
ย 
An Efficient and Fault Tolerant Data Replica Placement Technique for Cloud ba...
An Efficient and Fault Tolerant Data Replica Placement Technique for Cloud ba...An Efficient and Fault Tolerant Data Replica Placement Technique for Cloud ba...
An Efficient and Fault Tolerant Data Replica Placement Technique for Cloud ba...
ย 
IEEE Cloud computing 2016 Title and Abstract
IEEE Cloud computing 2016 Title and AbstractIEEE Cloud computing 2016 Title and Abstract
IEEE Cloud computing 2016 Title and Abstract
ย 
Determining The Total Cost Of Ownership Of Serverless Technologies
Determining The Total Cost Of Ownership Of Serverless TechnologiesDetermining The Total Cost Of Ownership Of Serverless Technologies
Determining The Total Cost Of Ownership Of Serverless Technologies
ย 
Google.Test4prep.Professional-Data-Engineer.v2038q.pdf
Google.Test4prep.Professional-Data-Engineer.v2038q.pdfGoogle.Test4prep.Professional-Data-Engineer.v2038q.pdf
Google.Test4prep.Professional-Data-Engineer.v2038q.pdf
ย 
CAR DAMAGE DETECTION USING DEEP LEARNING
CAR DAMAGE DETECTION USING DEEP LEARNINGCAR DAMAGE DETECTION USING DEEP LEARNING
CAR DAMAGE DETECTION USING DEEP LEARNING
ย 

Recently uploaded

Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
ย 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
ย 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
ย 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
ย 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
ย 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
ย 
ู…ุตุญู ุงู„ู‚ุฑุงุกุงุช ุงู„ุนุดุฑ ุฃุนุฏ ุฃุญุฑู ุงู„ุฎู„ุงู ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ.pdf
ู…ุตุญู ุงู„ู‚ุฑุงุกุงุช ุงู„ุนุดุฑ   ุฃุนุฏ ุฃุญุฑู ุงู„ุฎู„ุงู ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ.pdfู…ุตุญู ุงู„ู‚ุฑุงุกุงุช ุงู„ุนุดุฑ   ุฃุนุฏ ุฃุญุฑู ุงู„ุฎู„ุงู ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ.pdf
ู…ุตุญู ุงู„ู‚ุฑุงุกุงุช ุงู„ุนุดุฑ ุฃุนุฏ ุฃุญุฑู ุงู„ุฎู„ุงู ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ.pdf
ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ
ย 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
ย 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
ย 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
ย 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
ย 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
ย 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
ย 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
ย 
Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.
IsmaelVazquez38
ย 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
ย 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
ย 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
ย 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
ย 

Recently uploaded (20)

Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
ย 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
ย 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
ย 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
ย 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
ย 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
ย 
ู…ุตุญู ุงู„ู‚ุฑุงุกุงุช ุงู„ุนุดุฑ ุฃุนุฏ ุฃุญุฑู ุงู„ุฎู„ุงู ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ.pdf
ู…ุตุญู ุงู„ู‚ุฑุงุกุงุช ุงู„ุนุดุฑ   ุฃุนุฏ ุฃุญุฑู ุงู„ุฎู„ุงู ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ.pdfู…ุตุญู ุงู„ู‚ุฑุงุกุงุช ุงู„ุนุดุฑ   ุฃุนุฏ ุฃุญุฑู ุงู„ุฎู„ุงู ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ.pdf
ู…ุตุญู ุงู„ู‚ุฑุงุกุงุช ุงู„ุนุดุฑ ุฃุนุฏ ุฃุญุฑู ุงู„ุฎู„ุงู ุณู…ูŠุฑ ุจุณูŠูˆู†ูŠ.pdf
ย 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
ย 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
ย 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
ย 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
ย 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
ย 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
ย 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
ย 
Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.
ย 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
ย 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
ย 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
ย 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
ย 

Question 6 - 2k15 Exam Preparation Day

  • 1. Exam Preparation Day QUESTION 6 โ€“ APPLICATION PROGRAMMING
  • 2. Read the following scenario. Adelaide Show grounds, is considering changing from a paper-based ride system to a computer-based system, to ensure that customer taking rides can be serviced more effectively and the company can determine . Below are an extract from the Rides currently available.
  • 3. (a) (i) Identify and justify an efficient way of storing the prices for the rides. The most efficient method depends on language used. JavaScript: the most efficient way to store the prices is an object as this language doesnโ€™t have associative arrays. The object could store name and number. An ordinary array will work, as long as order of items in arrays is preserved for searches. VB has a similar issue. Here the most efficient way (advanced) is a new collection, similar to a JS object. Ordinary arrays the same as JS PHP has associative arrays, where names are used as indexes, rather than numbers.
  • 4. (a) (ii) When storing the information from part (i), discuss one potential output issue that will need to be resolved when presenting information to customers. Assuming arrays are used (JS, VB), order of product is important so that prices donโ€™t get mixed. Length of data is variable, so formatting is important. Prices are stored as numbers, so formatting (eg $) important here as well
  • 5. (b) Write a function that will record the sales of a ticket to a customer. Function StoreSales Input Ride, Quantity Validate by displaying, Y/N response IF N return to input Open SalesRecord array Add quantity to RideNumber(Ride) Close SalesRecord Return Pseudocode is often easier as there are no strict syntax rules. This does not mean good programming practice such as meaningful variables and indenting should not be used.
  • 6. (c) Discuss the implications of distributing the application program as a source file It is not a good idea if a commercial proposition, both for security of product (people can easily change/wreck it) and also there is no protection of intellectual property, so distributor could lose income. On the other hand many do distribute files in this way (freely), asserting copyright if to be used commercially, but able to deny responsibility if taken and used.
  • 7. Read the following scenario. Adelaide metro, is considering changing from a paper-based bus ride system to a computer-based system, to ensure that customer taking bus rides can be serviced more effectively when boarding a bus without a metro card. Below is an extract from the bus fair and a suggested algorithm for developing a computer-based program.
  • 8. (d) Identify the lines of code (i) Pre-test loop (ii) Fixed loop (e) Condition in conditional loop
  • 9. 0 0 0 0 2 1 1 1 3 2 2 2 1 1 1 3 4 1 1 4 1 1 2 5 2 2 3 6 3 4 6 7 2 2 5 8 0 0 53.50 The total taken by the driver is $53.50
  • 10. (g) Explain how recommended practices and conventions can improve the validity of user input. The code at present does not check whether the input value is as desired. One practice is to reflect the two entries โ€“ type and number and ask for confirmation. Another is to have a drop down list for the type of ticket, and a check that a number is actually entered for quantity of tickets. Then reflect back for confirmation. Actually a drop down list for number of tickets may also be a possibility.