Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I don't know how to attack this assignment. I need help. Geocaching is an outdoor a Global Positioning System (GPS) receiver or mobi ques to

I don't know how to attack this assignment. I need help.

image text in transcribed
Geocaching is an outdoor a Global Positioning System (GPS) receiver or mobi ques to hide and seek containers, called "geocaches marked by coordinates all over the world. As of 2021 there we hited States. Geocaching can be considered a I cache is a small waterproof container containing a logbook and The geocacher signs the log with their established code name an that they found the cache. After signing the log, the cache mus he person found it. Check out the wikipedia page here: Geocaching E For this assignment, you will replace the paper username log with a program that will store the usernames of players who find the geocache. Write a program that will add a player's username o a geocache log. This will be part of a larger geocaching program, so only a few functions are required. You can assume that other programmers will complete the other parts of the geocaching application. The main Function In the main function (5 points), perform the following tasks: . ask the for username and store it in a variable create an array of size 10 and fill each position with the string "empty" ask the user to identify the item found. If the item is equal to "original can of beans", then call the getSize function. Store the return value in a variable called arraySize . If the arraySize variable is not - 1, call the addUsername function and pass the array, the arraySize variable, and username variable as arguments. The getSize Function The getSize function (5 points) will return the number of array positions that hold usernames. Using a loop, count the number of array positions that do not hold the value "empty". If there are no positions that contain the string "empty", then the array is full, so display the error message "original can of beans destroyed by a lawn mower" and return -1, otherwise, return the count. The addUsername Function The addUsername function (5 points) will add a username to an array. This function requires three parameters: username array array Size variable This function should only have one line of code. Add the username to the array in the arraySize position. The displayUsernames Function The displayUsernames function (5 points) should use a loop to display all array positions that do not contain the word "empty

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions