Question: Suppose each node in a linked list has the fields year, total, and id . The id works as a numerical key. A programmer noticed

Suppose each node in a linked list has the fields year, total, and id. The id works as a numerical key. A programmer noticed that the total value was wrong. Each year greater than 2020 must have a total of 50% higher. Write a program that fixes the linked list. (LO 6.1,6.2). Output should look like this:Before fixing the list:
Year: 2019, Total: 100, ID: 1
Year: 2021, Total: 200, ID: 2
Year: 2023, Total: 300, ID: 3
Year: 2020, Total: 400, ID: 4
After fixing the list:
Year: 2019, Total: 100, ID: 1
Year: 2021, Total: 300, ID: 2
Year: 2023, Total: 450, ID: 3
Year: 2020, Total: 400, ID: 4
 Suppose each node in a linked list has the fields year,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!