Use the linked stack class to support

Assignment Help Programming Languages
Reference no: EM13168411

Use the Linked stack class to support an application that tracks the status of an online auction. Budding begins at 1(dollars, pounds, euros, or whatever) and proceeds in increments of at least 1. If a bid arrives that is less than the current bid, it is discarded. If a bid arrives that is more than the current bid, but less than the maximum bid by the current high bidder, then the current bid for the current high bidder is increased to match it and the new bid is discarded. If a bid arrives that is more than the maximum bid for the current high bidder, then the new bidder becomes the current high bidder, at a bid of one more than the previous high bidder's maximum. When the auction is over (the end of the input is reached), a history of the actual bids (the ones not discarded), from high bid to low bid, should be displayed. For example:
New bid Result High Bidder High Bid Maximum Bid
7 John New high bidder john 1 7
5 Hank High bid increased john 5 7
10 Jill New high bidder Jill 8 10
8 Thad no change Jill 8 10
15 joey New high bidder joey 11 15
The bid history for this auction would be
Joey 11
Jill 8
John 5
John 1
Input/output details can be determined by you or your instructor. In any case, as input proceeds the current status of the auction should be displayed. The final output should include the bid history as described above.

Reference no: EM13168411

Questions Cloud

Program that takes the amount a person has spent : Program that takes the amount a person has spent and determines the discount ($15 per $175 spent).
Beyond corporate responsibility : What examples from the readings or audio lectures stick out the most in your mind? Why? Has your perception of service learning changed since our first week?
Adt for a two color double stack adt consists of two stacks : design an adt for a two color double stack adt that consists of two stacks one red and one blue and has its operations color coded versions of the regular stack adt operations.
Write a program that allows a user to enter 12 double values : Write a program that allows a user to enter 12 double values representing store sales for each month of one year. After all 12 values are entered,
Use the linked stack class to support : Use the Linked stack class to support an application that tracks the status of an online auction. Budding begins at 1(dollars, pounds, euros, or whatever) and proceeds in increments of at least 1
Two stacks of positive integers are needed : Two stacks of positive integers are needed, both containing integers with values less than or equal to 1000. One stack contains even integers; the other contains odd integers. The total number of elements in the combined stacks is never more than ..
Write a function named dietoss that simulates the tossing : Write a function named dieToss that simulates the tossing of two dice. When you call the function, it should generate two random numbers ranged in 1 to 6 and return the sum of the die's numbers. In the mail program, ask user how many times the dice s..
Our string class always deletes the old character : Our String class always deletes the old character buffer and reallocates a new character buffer on assignment or in the copy constructor. This need not be done if the new value is smaller than the current value
Ext4 file systems on linux vs. ntfs file systems : List what characters are absolutely not allowed for ext4 file systems on Linux vs. NTFS file systems on Windows in a plain text document.

Reviews

Write a Review

Programming Languages Questions & Answers

  Create method to generate random integers

Create a method named posNeg which generates 1000 random integers. Range of numbers must be from -5 to +5 inclusive.

  C program to accept three numbers inputs by user

Write down C program to accept three numbers input by a user, and outputs a table of temperatures in Fahrenheit, Celsius, and Kelvin.

  Program to enter answer to a math problem

Write a program which ask student to enter an answer to a math problem. The user must enter two values, one at time, and then ask for answer.

  Create program to keep track of game collection

You wish to create a program which will keep track of the game collection at home. The program must recognize the platform.

  Explain about lexical analyzer

Explain about Lexical Analyzer

  Computing first seven values of fibonacci number sequence

Write a program that uses a loop to compute the first seven values of the Fibonacci number sequence.

  Create classes for account and savingsaccount

Create and write three classes - Account, CheckingAccount, and SavingsAccount. Have CheckingAccount and SavingsAccount inherit from Account.

  Write application to use random-number to create sentences

Write an application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition.

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

  Create class to calculate perimeter and area rectangle

Create class Rectangle. The class has attributes length and width, each of which defaults to 1. It has read-only properties that calculate the Perimeter and the Area of the rectangle.

  Program for sentinel address of all zeros and nickname

Explain class called address_t with members for four integers and must read list up to 100 addresses and nicknames terminated by sentinel address of all zeros and nickname.

  Create program to compute monthly interest

Create program to compute the monthly interest and print new balances for each of the savers. Then set annualInterestRate to 5% and compute the next month's interest

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd