Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE WRITE A FULL FUNCTIONING CODE FOR THE FOLLOWING REQUIREMENT Data Input Phase The main loop. An appropriate loop structure has been used for the

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribedimage text in transcribed

PLEASE WRITE A FULL FUNCTIONING CODE FOR THE FOLLOWING REQUIREMENT

  1. Data Input Phase
    • The main loop. An appropriate loop structure has been used for the data entry, and it works.
    • The user must enter the surname and the program does not allow it to be an empty string.
    • The user must enter the given name and the program does not allow it to be an empty string.
    • The user must enter the gender, and it must be one of the two possible values.
    • The user must enter the age in years, and it must be between 15 and 100 (inclusive).
    • The user must enter the post code, and it must consist of exactly 4 digits.
    • The user must enter whether employed, and it must be one of the two possible values.
  2. Calculation Phase
    • The rate of unemployment.
    • The average unemployed age for men and the average unemployed age for women.
  3. Display Phase
    • The inputted data is correctly presented in a HTML table complete with headings.
    • The unemployment rate, and average ages for unemployed men and unemployed women is presented.
  4. Non-Functional Requirements

No challenge here. The marks here are "low hanging fruit", i.e. easy marks. It would be sad to lose them.

  • Proper variable naming conventions are used.
  • Constants are used in place of numeric and string literals.
  • Correct use of value types.
  • Correct and consistent code indentation.
  • Block commenting.
  1. Challenge
    • The "Sort the Records" challenge.
    • The "Day of Birth" challenge.
    • The "Unemployed and Under-employed" challenge.
It isn't please complete
Naming Conventions Naming conventions should be observed for identifiers:- Constants are all UPPER_CASE. Variable and function names should be camelCased. Top Value Types You must demonstrate control over your value types:- Convert your strings to numbers using parseInt() or parseFloat() where appropriate. Do not apply parseInt() or parseFloat() to things that are already numbers or to things that are meant to be strings. Do not apply arithmetic operations to strings or string operations to numbers. Top Use Strict Your code should be executed in strict mode. I.E. It needs to have "use strict"; directive at the start of your

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started