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
Explain the While Statement - Computer Programming? A 'while statement' is an entry controlled loop statement. When the expression is calculated and the condition is not satisf

what is a microprocessor? types of microprocessors? advantages disadvantages

The ATM will simulate a real world automated teller machine that supports safe access to accounts from multiple concurrent clients.

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

New Features of Visual Studio 2008 1. LINQ Support LINQ primarily is the structure of many conventional question employees that allow you to perform with information in a more user


OOPS Concepts Object-oriented programming (OOP) is a computer science term used to characterize a programming language that began development in the 1960’s. The term ‘object-orient

specify the function of the instruction and also specify whether its right or wrong-: (5) 1) MOV [BX],AX? Register Indirect addressing 2) MOV CX,[BX+DI]?Base plus index add

what is java

The reader-writer problem can be stated as follows: A shared memory location can be concurrently read by any number of tasks, but when a task must write to the shared memory locati