Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

Instructions

You will combine your knowledge of class objects and linked lists. You will need to first create an object class encapsulating a Trivia Game which INHERITS from Game.

Game is the parent class with the following attributes:

description - which is a string

write the constructor, accessor, mutator and toString methods.

Trivia is the subclass of Game with the additional attributes:

1.trivia game id - integer

2. ultimate prize money - double

2. number of questions that must be answered to win-integer.

write the accessor, mutator, constructor, and toString methods.

Write a client class to test creating Trivia objects. Once you have successfully created Trivia objects, you will continue by creating a linked list of trivia objects.

Your linked list code should include the following: a TriviaNode class with the attributes:

1. trivia game - Trivia object

2. next- TriviaNode

write the constructor, accessor, mutator and toString methods.

A TriviaLinkedList Class which should include the following attributes:

1. head - TriviaNode

2. number of items - integer

write the code for the constructor, accessor and mutator, and toString methods. Also include the methods to insert a triviaNode on the list. You can assume inserts always insert as the first node in the list. Also write a method to delete a node by passing the id of the game to delete. Take into consideration that the game may not exist in the list. Your method should let the user know that the node was successfully deleted or not.

Write a client to test all aspects - creating trivia objects, inserting the objects as nodes to the list, deleting a node by passing the id of the trivia game. Print out the list every time you make a change such as adding a node and deleting a node. You should create at least 3 objects to be inserted to your list, then delete at least 1. Also, test deleting an object that is not in the list.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92743889

Have any Question?


Related Questions in Computer Engineering

Question search scholargooglecom for a company school or

Question: Search "scholar.google.com" for a company, school, or person that has been the target of a network or system intrusion? What information was targeted? Was the attack successful? If so, what changes were made to ...

Can someone please help me with this pleasetaskthe purpose

Can Someone please help me with this please: Task: The purpose of this assignment is to empirically measure attributes for binary search trees. Steps: Create a program that will build a binary search tree (BST) by adding ...

From slide number 1-37 how did we get value 00004 show all

From slide number 1-37, how did we get value 0.0004? Show all your work. Describe the most popular wireless Internet access technologies today. Compare and contrast them. What is the key distinguishing difference between ...

The newly elected president needs to decide the remaining 4

The newly elected president needs to decide the remaining 4 spots available in the cabinet he/she is appointing. If there are 13 eligible candidates for these positions (where rank matters), how many different ways can t ...

Let sigmaab give the transition diagram for a

Let Σ={a,b}. Give the transition diagram for a nondeterministic ?nite state machine that accepts the set of strings in {a,b}∗ that contain a substring of length four that begins and ends with the same symbol. For example ...

Question please assist with discussion questions please

Question: Please assist with discussion questions. Please answer following questions with at least 3 paragraph response. Thank you. Access control starts first with assessing risks so you can properly identify potential ...

Suppose you have used the following production function to

Suppose you have used the following Production Function to estimate the Industry's average and marginal products for its inputs: Q = 150 L 1/4 K 1/3  M 1/5. Where Q stands for output; L is labor; K is capital (machine ho ...

A manager has a 250 million portfolio that consists of 40

A manager has a $250 million portfolio that consists of 40% stock and 60% bonds. The beta of the stock position is 1.4. The modified duration of the bond position is 5. The manager wishes to achieve an effective mix of 7 ...

Draw supply and demand curve to illustrate the following

Draw supply and demand curve to illustrate the following sequences of events. Show changes in one graph. Assume upward sloping for supply curves and downward sloping for demand curves 1. In year 1, the rental apartment m ...

In a large university 6 of students live in dormitories a

In a large university, 6% of students live in dormitories. A random sample of 14 students is selected. What is the probability that the sample contains more than five students who do not live in the dormitories?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As