Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment Instructions The Deer Valley Online Auction company needs your help to debug ( fix ) their application that keeps track of seller item prices.
Assignment Instructions
The Deer Valley Online Auction company needs your help to debug fix their application that keeps track of seller item prices. The program is not working as it is supposed to and they want you to fix it
The Deer Valley Online Auction company requires its sellers to post items for sale for an eightweek period during which the price of any unsold item drops percent each week. For example, an item that costs $ during the first week costs percent less, or $ during the second week. In the third week, the same item is percent less than $ or $
The program should first prompt the user for a price, then output the price of the item during each of eight weeks. This should repeat until the sentinel value of is entered. After is entered, the program should exit.
Unfortunately, the program is not doing what it is supposed to be doing. You have to get this fixed by the end of the week!
The faulty program code is below. Highlight the code and copypaste it into the Online GDB compiler. Set the language to C# and run the program.
Program: This is the DV Auction Item Price Program
using System;
class DVAuction class header for DVAuction class
static void Main method header for main method
double itemPrice; Declaration of variable to hold item's price
Console.WriteLineWelcome to the Deer Valley Online Auction Program.
;
do posttest dowhile loop to keep asking user about item price
Console.WriteLinePlease enter the price of the item when all done;
itemPrice double.ParseConsoleReadLine;
for int week ; week ; week
for loop to repeat the calculation for weeks
itemPrice itemPrice itemPrice ;
reduce the item's price by each week
Console.WriteLineThe cost after week week
is $ String.Format:itemPrice;
output week number and new price to Console
end for loop
while itemPrice ; if the item's price was positive,
let's loop again and ask for another price.
end dowhile loop
Console.WriteLine
Thank you for using the Deer Valley Online Auction Program. ;
Console.WriteLineSee you again soon!";
end main method
end DVAuction class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started