I already posted once with this code for this really bad defined assignment I was given and I need to figure out a way to count the number of arguments in my class I have created to decide where to put ? and & within a URL. My really vague professor says to use a counter instance variable that contains the number of arguments appended to the object's URL...
Enter URL site (or 'exit')...
www.amazon.com
Url value read was: www.amazon.com
Enter URL argument name (or 'done')...
id
Enter type of argument value (string, integer, double)...
integer
Enter an integer value
123
Enter URL argument name (or 'done')...
name
Enter type of argument value (string, integer, double)...
string
Enter a string value
john connor
Enter URL argument name (or 'done')...
book
Enter type of argument value (string, integer, double)...
integer
Enter an integer value
666222
Enter URL argument name (or 'done')...
done
URL with appended arguments is:
http://www.amazon.comid=123name=john+connorbook=666222
Enter URL site (or 'exit')...
So I need some sort of code (I am so lost on what are the right words to use to describe what I need) to check where each name=value (ex. id=123) comes after the original URL to decide where to put the ? and & in the URL.
Sorry for the vagueness before, but as you can tell I am very frustrated with this and the professor for this class is not very helpful at all.
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|