Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

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

Recommended Textbook for

T Sql Fundamentals

Authors: Itzik Ben Gan

4th Edition

0138102104, 978-0138102104

More Books

Students also viewed these Databases questions

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago