Program to records name-bounty and difficulty for ten target, Programming Languages

Assignment Help:

You have been employed by a bounty hunter to create hit list (yes... you better do this right). Create a Hit List program that can records the name, bounty, and difficulty for ten targets.

Tasks:

1. Create a new HitList.pas file in your Documents/Code/Lab6 directory.

2. Implement the basic program structure, along with an empty Main procedure.

3. Copy in your User Input functions to make it easy to read input from the user.

4. Create a new Target record with the following details. Use chapter 7 of the text to determine how to code this.

Listing 1: Structure for the Target record

5. Create a ReadTarget function that returns a Target from values entered at the Terminal Read name, bounty, and difficulty from the user and store in the result

6. Create a PopulateHitList procedure. This will be passed an array of Target values. Have it read in a Target for each element in the array (using ReadTarget).

7. Create a hits local variable in Main, this will store 10 Target values.

8. Populate the hits variable using the PopulateHitList procedure.

9. Create a PrintHitList procedure. This will be passed an array of Target values, that it will print to the Terminal. Show in the format "name : $bounty (difficulty)".

10. Compile and run your program in the Terminal, check that all of the values you enter are printed out.

Extension:

1. Create a SortHitList procedure that sorts the results so that the Target with the highest bounty is the first in the array. If two Targets have the same bounty, sort them so that the one with the smaller difficulty comes first.


Related Discussions:- Program to records name-bounty and difficulty for ten target

Script of switch case, Write a script called 'prob3.m' that does the same t...

Write a script called 'prob3.m' that does the same thing as the previous question except that it makes use of a switch-case construct instead of an if-else. In the file 'hw4.m'

We are need of a prestashop expert, We are need of a PrestaShop Expert W...

We are need of a PrestaShop Expert We are getting a fresh design created for our Jewellery website. This job is in 2 parts 1. The website engine is PrestaShop as well as w

Jsp, how can we get the data from data base to combo box in jsp page dynami...

how can we get the data from data base to combo box in jsp page dynamically

Implement a two-dimensional table in prolog, Implement a two-dimensional ta...

Implement a two-dimensional table in Prolog. Your program will contain: An insert_entry predicate that takes a table, row, column and an entry and inserts the entry at the g

Program to calculate the triangle area, Write a program that will allow the...

Write a program that will allow the user to input the corners of a triangle. The program will draw small yellow circles for each input point, then draw the triangle and calculate t

Shell script to print pyramid, Normal 0 false false false ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Define a prolog predicate that asserts list, Define a Prolog predicate flat...

Define a Prolog predicate flatten(List, FlattenedList)  that asserts List  is any nested list of atoms and  FlattenedList  is the same list with the nesting removed. The atom [] sh

Develop html code create web page of blue color , 1.  Develop an HTML code ...

1.  Develop an HTML code to create a Web page of blue color & display links in red color. 2.  Develop an HTML code to create a Web page which contains an image at its center.

Data normalization and schema refinement, What is Data Normalization and Sc...

What is Data Normalization and Schema Refinement? Define briefly..

Write Your Message!

Captcha
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