• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

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: 23928
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.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic