Stage 2: Validation

Building on stage 1, you now need to ensure that the program checks for valid entries in each case, and converts the text to the appropriate format.

毕业论文代写,代写paper,北美CS代写-编程代码,代写金融-第一代写网You need to:

  • Ensure that a model, year, blue plate number and owner were entered, If any of these were not entered, do not record that item and go straight to asking if they wish to continue.
  • Ensure that the user enters either “Y”, “y”, “N” or “n” when asked if they wish to continue. Continue to ask until they enter a valid result.
  • For extra marks, (and this is challenging), ensure that the blue plate number consists of a letter followed by five numerals.

Sample output:

Hardware Manager
Computer Model: Acer Aspire 5
Purchase Year: 2018
Blue Plate: A87634
Owner: Gaye Deegan
Acer Aspire 5 (2018) A87634 has been recorded.
Do you wish to enter another record? (Y/N) yes
Do you wish to enter another record? (Y/N) y
Computer Model:
No record has been recorded.
Do you wish to enter another record? (Y/N) Y
Computer Model: Lenovo Yoga 520
Purchase Year: 2017
Blue Plate: G65438
Owner: Ben Martini
Lenovo Yoga 520 (2017) G65438 has been recorded.
Do you wish to enter another record? (Y/N) N
1. Acer Aspire 5 (2018) A87634: Gaye Deegan
2. Lenovo Yoga 520 (2017) G65438: Ben Martini
Thankyou.