Skip to content

Ceaser404/DataStructures303Hw.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataStructures303Hw.1

Inside main.cpp a new object can be created of class arrayManip by the following code:

arrayManip array1;

There are four main methods that can be called on array1 shown below:

array1.findInteger(); array1.modifyInteger(); array1.addInteger(); array1.deleteInteger();

The array can be displayed by calling the following method:

array1.displayTheArray();

***************The following examples show each method working correctly. *********************** The array may also be displayed to show the changes were made.

array1.findInteger(); Screenshot 2023-02-11 154450

array1.modifyInteger(); Screenshot 2023-02-11 154858

array1.addInteger(); Screenshot 2023-02-11 155051

array1.deleteInteger(); Screenshot 2023-02-11 155750

Exception handling was also built in to some of the functions as the following pictures show. Try and catch were used to ensure that numerical inputs were accepted, while characters and strings would terminate the program.

A function that can modify the value of an integer when called with the index of the integer in the array and return the new value and old value back to the user.

array1.modifyInteger(); // try and except

Screenshot 2023-02-11 160552

A function that adds a new integer to the end of the array

array.addInteger(); // try and except

Screenshot 2023-02-11 160727

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages