[Solved] Programming Test Number Ring

$25

File Name: Programming_Test__Number_Ring.zip
File Size: 273.18 KB

SKU: [Solved] Programming Test – Number Ring Category: Tag:
5/5 - (1 vote)

Specification:

  1. Please create a project folder (using any programming language) with the following name:

COSC489_PT_2168_<your username>

and please make sure to replace <your username> portion with your real FSU username.

  1. In the above project you can implement in any programming language to realize the following functions.
  2. Your program will access an input file with the name txt, which is located right outside of the above project folder (i.e. your project folder and this input file are sitting in the same folder). Please make sure in your program dont use absolute path but a relative path to access the input file. A sample of this input file is provided together with this specification.
  3. Your program will process the above input file and operate as it specifies.
  4. Initialize a number ring: read in the initial list of number and create the initial number ring with the first number to be the current number on the ring (the red number is the current number). Given the initial list of numbers of 2 3 5 6 1 4 8 5 we can get.
5
3
6
2
1
4
5
8
  1. The following list of operations can be carried out in any order and repeated any number of times. The operation names are case in
  1. Insert: it will add a number into the ring right before (counterclockwise) the current number. The newly inserted number will become the new current number.
5
5
4
3
3
6
2
2
1
7
4
5
5
8
8
  1. Append: it will add a number into the ring right after (clockwise) the current number. The newly appended number will become the new current number.
5
5
4
3
3
6
7
2
1
2
4
5
5
8
8
  1. Delete: it will delete the current number. Its right hand side (clockwise) number will become the new current number.
5
4
6
3
5
6
1
2
3
1
4
5
5
8
8
  1. Jump: it changes the current pointer. If the jump number is too large/small, the counting wraps around the ring again and again. Positive jump number means going clockwise while negative means counter-clockwise.
5
5
4
3
3
6
2
1
2
4
5
5
8
8
  1. Sort: it will sort the numbers in the ring in increasing order clockwise. The current number will be in the same place after sorting.
5
4
4
3
3
5
6
2
2
1
5
5
1
6
8
8
  1. Print: it will print out all the numbers in the ring in one line starting at the current number and going clockwise.
5
4
3
6
2
1
2 3 5 6 1 4 8 5
5
8
  1. You are required to demonstrate your program to the instructor on the due day in class in order to receive grades.

Submission:

  1. Please zip your project folder (and do not include any input file) and you should get a file with this name (not in rar):

COSC489_PT_<your username>.zip

  1. Be sure to unzip the above file and try the program out to make sure zip works correctly.
  2. Then submit your zip file to Blackboard before 10AM, April 12, Wednesday.

Grading:

  1. Grading of this program is based on:
    1. Whether your program performs as it should (70%);
    2. Whether your program has the correct logical structure (20%);
    3. Whether you program follows the recommended programming style (10%).
  2. The total of this test is 100 points.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Programming Test Number Ring
$25