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
We want a program, a logic, we can list the intermediate films sandwiched between the 2 tapes (from - to) that indicates the user. example: From to

Write a function called triple (in a file called 'triple.m'). That takes a single variable x and returns a single variable in which every element of x is multiplied by 3. Make sure

Lazytown Constabulary are concerned that young people in the town are unaware of the sorts of crime that they might encounter in their daily lives and are concerned that they may b

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

Determine the moment of force about the point where a bracket is attached to a wall. the bracket is shown in figure attached. it extends 10 inched out from the wall and 5 inched up

A non-empty string is called a minimal unique substring of s if and only if it satisfies: (i) α occurs exactly once in s (uniqueness), (ii) all proper prefixes of occur at le

Who can help with MATLAB?

You will design and implement a program that will • analyse the various characteristics of a maze, represented by a particular coding of its basic con- stituents into numbers store

I need to do image reconstruction using Neural Network using Matlab

Architecture and Components The .NET Framework 3.5 The .NET Structure (pronounced dot net) is an application framework that works generally on Enthusiasm Microsoft windows. It has