• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help with assignment

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had an assignment that was due a few hours ago. I did not know how to do the assignment, but since we have a test next week, I figured that I needed to still get the assignment done anyway so that I could study it. Not sure if I can post links here or not because I'm new.

https://www.cct.lsu.edu/~sbrandt/csc1351/03/1351-arrays.php

Any type of help is welcome. Thank you in advanced.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

First, welcome to the ranch.

Anyway, what have you done so far? What trouble you are running into? It would also help if you provide as much detail as possible regarding your confusion. In fact, sometimes, while gathering your details, to the point of working out the questions to ask, you can sometimes hit an "aha" moment, and figure out what to do next.

Henry
 
Elijah Antoine
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently stuck on the third constructor. It says that it has to specify a range. I know that the "Arrays" package has an easy way of doing this, but the instructions do not allow the use of the "Arrays" package.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What have you got so far?
How did you do your answer for Contructor #1? Constructor #2?

You should just have to build on those for Constructor #3.

You will have to
- create a new array object - what size should it be?
- check the ranges you have been given are valid for the input array
- copy from the "input" array to your "new" array. Presumably with the assignment statement. i.e. targetArray[index] = sourceArray[fromIndex]. That will probably require a loop.
 
I don't even know how to spell CIA. But this tiny ad does:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic