[SOLVED] CSE220 Assignment 1

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignment01-2rvv3b.zip (729.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Task 1:

Given array is –

X= Last 4 digit of your BRACU ID % 33 + Last 4 digit of your BRACU ID % 34
Write a java code for linear array which has below 10 functionalities and trace your code. Include the

tester file and write the output array after each operation. [Hint1: In one java class you have to implement all the methods]

[Hint2: All tasks should be implemented on the same instance of the array]

  1. a)  Print the elements
  2. b)  Copying an array
  3. c)  Resizing an array
  4. d)  Reversing an array
  5. e)  Shifting an array left
  6. f)  Shifting an array right
  7. g)  Inserting an element at any position
  8. h)  Removing an element from any position
  9. i)  Rotating an array left
  10. j)  Rotating an array right

| Deadline:

X-18

X+4

X

X+14

X-5

X+4

X-2

X+9

Task 2:

Given array is –

Where,
X = Last 4 digit of your id % 33 + Last 4 digit of your id % 34 Y = Last 3 digit of your id % 33 + Last 3 digit of your id % 34 A = (X+1)_John_(Y+10)
B = (X+2)_John_(Y+20)
C = (X+3)_John_(Y+30)
D = (X+4)_John_(Y+40)
E = (X+5)_John_(Y+50)
F = (X+6)_John_(Y+60)

// john will be replaced with your name initials. Example: Mofiz Uddin Khan -> initial MUK
Perform the following operations and show simulation (i.e write the resulting array). Write the final

output after each operation. No need to write the code.
[Hint: All tasks should be implemented on the same instance of the array]

  1. a)  Print the elements
  2. b)  Resizing the array [new length = Last 4 digit of your id %5 + Last 3 digit of your id %3 + 8] and fill the elements according to the given order .. (X+…)_John_(Y+…)
  3. c)  Reverse the array
  4. d)  Shifting array left by one position
  5. e)  Shifting array right by one position
  6. f)  Inserting an element [in position = Last 3 digit of your id %7]
  7. g)  Removing an element [in position = Last 3 digit of your id %5 ]
  8. h)  Rotating array left by X position [X = Last 3 digit of your id %5]
  9. i)  Rotating array right X position [X = Last 3 digit of your id %5]
  10. j)  Inserting an element [in position = Last 3 digit of your id %10]
  11. k)  Removing an element [in position = Last 3 digit of your id %9 ]
  • Assignment01-2rvv3b.zip