

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Note: you can only use concepts covered up to and including Module 3, Unit 3 of the course content
Complete the following programming questions by writing a Java program. Ensure that you are submitting in the correct format by reading the โLAB FORMATTING DOCUMENTโ that is posted on Brightspace in the Lab module. You will need to submit a PDF which contains your source code (as text) as well as a screenshot of the programโs execution. In windows, you can use Shift+WindowsKey+S to take a screenshot of your output. Formatting deductions may be applied if this is not followed. If you have any questions about formatting, please contact the lab instructor. Q1 - Programming (2 marks) โ Write a program to calculate the mean and standard deviation for a set of user-entered double values. โ ๐๐๐๐ = ๐ ๐ข๐ ๐๐ ๐๐๐ ๐ฃ๐๐๐ข๐๐ ๐๐ข๐๐๐๐ ๐๐ ๐ฃ๐๐๐ข๐๐ (๐) โ ๐ ๐ก๐๐๐๐๐๐ ๐๐๐ฃ๐๐๐ก๐๐๐ = ๐ ๐ข๐ ๐๐ ๐ ๐๐ข๐๐๐๐ ๐ โ ๐ ๐ข๐ ๐๐ ๐ ๐๐ข๐๐๐๐ = ((๐ฅ 1
2
2
2 ) โ ๐ ๐ข๐^2 ๐ โ โ Input will begin and end as outlined in the output example. โ Submit screenshots of output with the following example sets: โ 27, 81, 45, 13, 97, 22 โ 27.8, 81.2, 45.7, 13.9, 97.3, 22. โ Your student number, separated into 5 values โ Example: #122334455 = 1, 22, 33, 44, 55 Output Example:
Q2 - Programming (2 marks) โ Write a program containing a method that checks to see if a String is a valid password. The password will be valid given the following requirements: โ In the main method, you should call the password method at least 3 times. โ The first time, test it with your full name. โ The second time, test it with your first name + the last 4 digits of your student number + a symbol of your choice. โ Print the results of both tests to the console. โ In the third call, you should accept a password from the user and report if it is valid. Output Example: