Answer the 5th and 6th question; You were hired to write a program that manages weather forecast data. Before accessing
Posted: Fri Apr 29, 2022 6:57 am
Answer the 5th and 6th question;
You were hired to write a program that manages weather forecast
data.
Before accessing the interface, the user must login.
1) Log in:
The user must enter the email and password. Your program must
check if the user exists (you will be provided with an input file
(“users.txt”) that contains 3 users to start with). A user exists
if the email and the password entered match the ones in the file.
If the user types in a username that doesn’t exist, the program
needs to inform the user and ask for a new username. If the
username exists but the password doesn’t match, the program should
inform the user that the password is incorrect and allow a new
attempt. After 3 unsuccessful attempts, the program must ask him
the secret question which is available in the file and check the
answer with the one provided.
Once signed in, your program must interact with the user in a
loop that allows the user to perform the following actions
2) Signup Menu:
If the user that logged in is the admin, he/she will have the
option to sign up new users. The admin is prompted to enter all the
information as shown in the input file. When entering the
information, if the admin enters an existing email in the users.txt
file, he will be informed that the information already exists in
the records file and needs to enter different ones.
3) Logout Program:
When the user decides to exit the program, it should generate
two files users_new.txt and forecast_new.txt that include all the
modifications that have been performed during the execution of the
program.
4) Change user information
The user will be introduced to a page where he/ she can change
any information in their own profile (profile name, password,
email, secret question, and secret answer) and the information must
be updated to the user profile. Before any change to the profile,
the user MUST be asked to re-authenticate by re-entering the
password only.
Password rules: for safety concerns the password must contain 12
characters that must include at least one uppercase, lowercase,
digit, and special character.
5) Display forecast data
The program should read from the forecast.txt file the forecast
data that is already stored. This data is made from four pieces of
information per day: temperature, max UV index, humidity, and wind
speed. For example, a line that reads 20220325 25 5 36 20 means
that for the day 25/03/2022, there is a temperature of 25°C, a max
UV index of 5, 36% humidity, and wind speed of 20 km/h. This
function displays the forecast data for all the days that are
written in the file. The display shows data in a clear and useful
manner, adding the units to the readings and displaying the date
using the dd/mm/yyyy format.
Additionally, the display function should show the averages for
the four measurements as well as the highest and lowest
temperatures.
6) Add forecast data
The program should allow the user to add forecast data according
to the structure described above. After selecting the day, month,
and year, the user needs to specify the corresponding temperature,
max UV index, humidity, and wind speed. The program should not have
two readings for the same day. If the date entered by the user
already exists, the program should ask if the data should be
overwritten or not and act accordingly.
7) Update or delete forecast data
The program should allow the user to select a specific date and
either modify its corresponding data or delete that daily weather
forecast entirely.
You were hired to write a program that manages weather forecast
data.
Before accessing the interface, the user must login.
1) Log in:
The user must enter the email and password. Your program must
check if the user exists (you will be provided with an input file
(“users.txt”) that contains 3 users to start with). A user exists
if the email and the password entered match the ones in the file.
If the user types in a username that doesn’t exist, the program
needs to inform the user and ask for a new username. If the
username exists but the password doesn’t match, the program should
inform the user that the password is incorrect and allow a new
attempt. After 3 unsuccessful attempts, the program must ask him
the secret question which is available in the file and check the
answer with the one provided.
Once signed in, your program must interact with the user in a
loop that allows the user to perform the following actions
2) Signup Menu:
If the user that logged in is the admin, he/she will have the
option to sign up new users. The admin is prompted to enter all the
information as shown in the input file. When entering the
information, if the admin enters an existing email in the users.txt
file, he will be informed that the information already exists in
the records file and needs to enter different ones.
3) Logout Program:
When the user decides to exit the program, it should generate
two files users_new.txt and forecast_new.txt that include all the
modifications that have been performed during the execution of the
program.
4) Change user information
The user will be introduced to a page where he/ she can change
any information in their own profile (profile name, password,
email, secret question, and secret answer) and the information must
be updated to the user profile. Before any change to the profile,
the user MUST be asked to re-authenticate by re-entering the
password only.
Password rules: for safety concerns the password must contain 12
characters that must include at least one uppercase, lowercase,
digit, and special character.
5) Display forecast data
The program should read from the forecast.txt file the forecast
data that is already stored. This data is made from four pieces of
information per day: temperature, max UV index, humidity, and wind
speed. For example, a line that reads 20220325 25 5 36 20 means
that for the day 25/03/2022, there is a temperature of 25°C, a max
UV index of 5, 36% humidity, and wind speed of 20 km/h. This
function displays the forecast data for all the days that are
written in the file. The display shows data in a clear and useful
manner, adding the units to the readings and displaying the date
using the dd/mm/yyyy format.
Additionally, the display function should show the averages for
the four measurements as well as the highest and lowest
temperatures.
6) Add forecast data
The program should allow the user to add forecast data according
to the structure described above. After selecting the day, month,
and year, the user needs to specify the corresponding temperature,
max UV index, humidity, and wind speed. The program should not have
two readings for the same day. If the date entered by the user
already exists, the program should ask if the data should be
overwritten or not and act accordingly.
7) Update or delete forecast data
The program should allow the user to select a specific date and
either modify its corresponding data or delete that daily weather
forecast entirely.
You were hired to write a program that manages weather forecast
data.
Before accessing the interface, the user must login.
1) Log in:
The user must enter the email and password. Your program must
check if the user exists (you will be provided with an input file
(“users.txt”) that contains 3 users to start with). A user exists
if the email and the password entered match the ones in the file.
If the user types in a username that doesn’t exist, the program
needs to inform the user and ask for a new username. If the
username exists but the password doesn’t match, the program should
inform the user that the password is incorrect and allow a new
attempt. After 3 unsuccessful attempts, the program must ask him
the secret question which is available in the file and check the
answer with the one provided.
Once signed in, your program must interact with the user in a
loop that allows the user to perform the following actions
2) Signup Menu:
If the user that logged in is the admin, he/she will have the
option to sign up new users. The admin is prompted to enter all the
information as shown in the input file. When entering the
information, if the admin enters an existing email in the users.txt
file, he will be informed that the information already exists in
the records file and needs to enter different ones.
3) Logout Program:
When the user decides to exit the program, it should generate
two files users_new.txt and forecast_new.txt that include all the
modifications that have been performed during the execution of the
program.
4) Change user information
The user will be introduced to a page where he/ she can change
any information in their own profile (profile name, password,
email, secret question, and secret answer) and the information must
be updated to the user profile. Before any change to the profile,
the user MUST be asked to re-authenticate by re-entering the
password only.
Password rules: for safety concerns the password must contain 12
characters that must include at least one uppercase, lowercase,
digit, and special character.
5) Display forecast data
The program should read from the forecast.txt file the forecast
data that is already stored. This data is made from four pieces of
information per day: temperature, max UV index, humidity, and wind
speed. For example, a line that reads 20220325 25 5 36 20 means
that for the day 25/03/2022, there is a temperature of 25°C, a max
UV index of 5, 36% humidity, and wind speed of 20 km/h. This
function displays the forecast data for all the days that are
written in the file. The display shows data in a clear and useful
manner, adding the units to the readings and displaying the date
using the dd/mm/yyyy format.
Additionally, the display function should show the averages for
the four measurements as well as the highest and lowest
temperatures.
6) Add forecast data
The program should allow the user to add forecast data according
to the structure described above. After selecting the day, month,
and year, the user needs to specify the corresponding temperature,
max UV index, humidity, and wind speed. The program should not have
two readings for the same day. If the date entered by the user
already exists, the program should ask if the data should be
overwritten or not and act accordingly.
7) Update or delete forecast data
The program should allow the user to select a specific date and
either modify its corresponding data or delete that daily weather
forecast entirely.
You were hired to write a program that manages weather forecast
data.
Before accessing the interface, the user must login.
1) Log in:
The user must enter the email and password. Your program must
check if the user exists (you will be provided with an input file
(“users.txt”) that contains 3 users to start with). A user exists
if the email and the password entered match the ones in the file.
If the user types in a username that doesn’t exist, the program
needs to inform the user and ask for a new username. If the
username exists but the password doesn’t match, the program should
inform the user that the password is incorrect and allow a new
attempt. After 3 unsuccessful attempts, the program must ask him
the secret question which is available in the file and check the
answer with the one provided.
Once signed in, your program must interact with the user in a
loop that allows the user to perform the following actions
2) Signup Menu:
If the user that logged in is the admin, he/she will have the
option to sign up new users. The admin is prompted to enter all the
information as shown in the input file. When entering the
information, if the admin enters an existing email in the users.txt
file, he will be informed that the information already exists in
the records file and needs to enter different ones.
3) Logout Program:
When the user decides to exit the program, it should generate
two files users_new.txt and forecast_new.txt that include all the
modifications that have been performed during the execution of the
program.
4) Change user information
The user will be introduced to a page where he/ she can change
any information in their own profile (profile name, password,
email, secret question, and secret answer) and the information must
be updated to the user profile. Before any change to the profile,
the user MUST be asked to re-authenticate by re-entering the
password only.
Password rules: for safety concerns the password must contain 12
characters that must include at least one uppercase, lowercase,
digit, and special character.
5) Display forecast data
The program should read from the forecast.txt file the forecast
data that is already stored. This data is made from four pieces of
information per day: temperature, max UV index, humidity, and wind
speed. For example, a line that reads 20220325 25 5 36 20 means
that for the day 25/03/2022, there is a temperature of 25°C, a max
UV index of 5, 36% humidity, and wind speed of 20 km/h. This
function displays the forecast data for all the days that are
written in the file. The display shows data in a clear and useful
manner, adding the units to the readings and displaying the date
using the dd/mm/yyyy format.
Additionally, the display function should show the averages for
the four measurements as well as the highest and lowest
temperatures.
6) Add forecast data
The program should allow the user to add forecast data according
to the structure described above. After selecting the day, month,
and year, the user needs to specify the corresponding temperature,
max UV index, humidity, and wind speed. The program should not have
two readings for the same day. If the date entered by the user
already exists, the program should ask if the data should be
overwritten or not and act accordingly.
7) Update or delete forecast data
The program should allow the user to select a specific date and
either modify its corresponding data or delete that daily weather
forecast entirely.