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

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.

Posted Date: 2/19/2013 4:13:35 AM | Location : United States







Related Discussions:- Program to records name-bounty and difficulty for ten target, Assignment Help, Ask Question on Program to records name-bounty and difficulty for ten target, Get Answer, Expert's Help, Program to records name-bounty and difficulty for ten target Discussions

Write discussion on Program to records name-bounty and difficulty for ten target
Your posts are moderated
Related Questions
1- If the order of a (mod P) is 3, prove that the order of a+1 is 6. 2- Explain why the "simplifiled knapsack" code is not secure.

One of the main strengths of the Perl programming language are its powerful text manipulation features. In this assignment, you will put them to use for writing a Perl program that

Microsoft's VC++ Windows V C++ was a highly effective device. But it was too complicated. It has too many information kinds, and designers had to understand many your local lib

Question 1 How will you add styles to a document? Question2 How will you view XML in different ways? Question 3 Explain various file handling mechanism available in PERL

Write a function lastfirst() that takes a list of strings as a parameter. Each string in the list has the format ''Last, First'' where Last is a last name and First is a first nam

Expertsmind brings you unique solution in java assignments Packages A Java packages is a process for planning Java sessions into namespaces just like the segments of Modu

Your task is to write an application to analyse texts in a file.  Your application will employ  several kinds of text-analyser objects (which you also have to implement)  as descri

Operation • This application uses an Alligator class that implements a Countable interface to display Alligator objects as shown above. • This application uses a Sheep class that i

1 Real and 2 Complex Eigenvalues    From the real eigenvalue/vector pair, l 1 and ?h 1 e l1 t ?h 1 We find the other two solutions in identical manner which we did

1)      Go to Start -> Programs->Accessories->Notepad. 2)      Start with a document type tag & an opening tag. Enter the given line in your doc.