Write a client to test all aspects

Assignment Help Basic Computer Science
Reference no: EM131480391

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. 

Reference no: EM131480391

Questions Cloud

Purpose of conducting a risk analysis : What is the purpose of conducting a Risk Analysis, what does it provide?
Discuss the wage determination model : What other variables do you think should be included in the wage determination model? How would that change the models discussed in the text?
Bios-cmos manage hardware : In a few sentences, discuss how you may have to adjust the BIOS settings when you install them. Based on your learning this week, how does the BIOS/CMOS manage.
Find out the impact of cigarette smoking on bladder : Use the data given in Table to find out the impact of cigarette smoking on bladder, kidney, and leukemia cancers. Specify the functional form you use.
Write a client to test all aspects : 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.
Are there any outliers in the cancer data : Use the data given in Table to find out the impact of cigarette smoking on bladder, kidney, and leukemia cancers. Specify the functional form you use.
Should the organization consider an internal posting : Should the organization consider both an internal and external posting? What are the advantages and disadvantages of each?
Operational profile concept : Explain how the operational profile concept can be applied to regression tests.
Define and explain mark-to-market accounting approach : ACC305 Accounting Theory - Define and explain mark-to-market accounting approach and give examples where Enron's management/accountants perhaps misused

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create a 64mb encrypted file system

Write an instruction sheet for the user so that she can make the modi cations to her home machine so that she can access the le on the ash drive containing the encrypted le system.

  Various variables to store various information

While doing programming in any programming language, you need to use various variables to store various information.Describe those variable in details.

  What is the sum for this number of terms

Use a while loop to determine how many terms in the series 2k, k = 1, 2, 3, . . . , are required for the sum of the terms to exceed 2000. What is the sum for this number of terms?

  Examine the current balance

Write the SQL code to examine the current balance, ACC_BALANCE, for the account, ACC_NUM, with the value 45689 located in the CHECKACC table.  The ACC_NUM is a character field.

  What is the general algorithm for solving this problem

what is the general algorithm/approach for solving this problem? as a test case, move_robot 10 forward 3 = 13

  Examine and assess the main computing problems

Use at least three (3) quality resources in this assignment. Note: Wikipedia and similar Websites do not qualify as quality resources.

  Identify five different it systems

Identify five different IT systems that have affected business in the past few years

  Cross-tabulations called contingency tables

When are cross-tabulations called contingency tables?

  Network administration processes update

Network Administration Processes Update

  Displays the result of rolling several

Write a program that computes and displays the result of rolling several 6-sided dice and adding a number. Prompt the user for the number of dice and the number to add. Display values read from the user as shown below: "xD6+y is z.", where x is th..

  What is a process model

1. What is a process model? What is a data flow diagram (DFD)? Are the two related? If so, how? 2. Distinguish between logical process models and physical process models.

  Business-level strategy

From the first e-Activity, assess your satisfaction with the company you researched and make recommendations about how that company could modify its business-level strategy to both increase your overall level of satisfaction and to attract new cus..

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