0% found this document useful (0 votes)
38 views

Lab. Activity 3 - Array Basic Operations

This document provides instructions for a CS 131 laboratory activity on array basic operations. Students are asked to write C++ programs that [1] traverse and output elements of a given array, [2] insert a new element into an array, and [3] delete an element from an array. Students must submit their code and results in a zip file with a specific naming convention to the provided email by the due date. The activity will be graded based on understanding of arrays, identification of appropriate data representation, programming style, and problem solving ability.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Lab. Activity 3 - Array Basic Operations

This document provides instructions for a CS 131 laboratory activity on array basic operations. Students are asked to write C++ programs that [1] traverse and output elements of a given array, [2] insert a new element into an array, and [3] delete an element from an array. Students must submit their code and results in a zip file with a specific naming convention to the provided email by the due date. The activity will be graded based on understanding of arrays, identification of appropriate data representation, programming style, and problem solving ability.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CS 131 – Data Structures and Algorithms

Laboratory Activity # 2: Array Basic Operations

Name:_________________________
Course, Year and Section: _________

---------------------------------------------------------------------------------------------------------------------
Directions:

1. Create the following problems in C++. Copy the code and paste it in a word file. One (1)
word file per problem. Collect it and Zip the file.

2. Each problem must be also be provided with simulation results. Place your simulation
results to the word files created.

3. The Name of the zip file must be in this format SurnameFirstName_Lab3.zip.

4. The zip file will be sent to this email: [email protected].


The subject to the email must be: Lab. Activity 3 – Surname, First Name.

5. Send it using your institutional accounts (google account).

6. Don’t forget to turn in your assignment once you send the file to the email address given

---------------------------------------------------------------------------------------------------------------------

Problems:

a. Write a program that will Traverse the elements & show the output of the following
elements in a given array:
Given:
Arr1[8] = {Dasher, Dancer, Prancer, Comet, Cupid, Donner, Blitzen, Vixen}
Default index = 0;

b. Write a program that will ask to enter five (5) Names of a person (in a form of Array) and ask
what New Name (New Element) to be inserted. The New Name (New Element) should be
inserted at the last position of the array.

c. Delete an element & Show the output of the new following elements:

Arr1 = {Dasher, Dancer, Prancer, Comet, Cupid, Donner, Blitzen, Vixen}


Default index = 0;
To Delete:
Index Position = 3

--------------------------------------------------------------------------------------------------------------------
Rubrics from this Lab Activity are as follows:
40 Points
Understanding of Array Concepts:
Advanced Proficient Approaching Beginning
(10points) (9 points) Proficiency (3 points)
(6 points)
Demonstrates an Usually Provides
understanding of differentiates Sometimes limited
efficiency of data between indexed differentiates differentiation
representation in and non-indexed between indexed between
lists. variables. and non-indexed indexed and
variables. non-indexed
variables.
Identification of Data:

Advanced Proficient Approaching Beginning


(10points) (9 points) Proficiency (3 points)
(6 points)
Rarely
Clearly Usually identifies Identifies some identifies
differentiates data data best data best characteristics
best represented as represented as represented as of data best
array. array. array. represented as
array.

Programming Style

Advanced Proficient Approaching Beginning


(10points) (9 points) Proficiency (3 points)
(6 points)
Rarely uses
Consistently uses Consistently uses Usually uses proper style
proper conventions proper style. proper style. (indentation,
and style. separation of
program
structures)
Solution of Problem
Advanced Proficient Approaching Beginning
(10points) (9 points) Proficiency (3 points)
(6 points)

Program provides Program adequately Program is Program


exemplary solution. solves problem. functional but rarely solves
fails limit testing. problem.

You might also like