Software Design Laboratory Assignment 6

$24.99 $18.99

Please note: This is an individual assignment; please do your own work. Sharing and/or copying code in part or whole with/from others will result in a grade of 0 and disciplinary actions for all involved parties. If you run into problems and have done your best to solve them, please talk to me during office…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Please note:

  • This is an individual assignment; please do your own work. Sharing and/or copying code in part or whole with/from others will result in a grade of 0 and disciplinary actions for all involved parties. If you run into problems and have done your best to solve them, please talk to me during office hours or by e-mail.

  • There is a 25% grade deduction for every day the assignment is late unless prior permission is granted.

Preamble

In this assignment we will work with Java’s Lambdas and Streams as an alternative to traditional procedural programming. None of the required work should use a , , or loops; you can only use functional programming reductions and intermediate operations.

There is only one file to complete for this assignment. Class works with the provided test code. Update the methods of as follows:

  1. , converts a stack to a queue. Use theclass as your queue instance.

  1. , returns a new stack with items reversed from the original stack.

  1. , returns the sum of values in the Stack between the specified positions. Make sure the start and end positions are within the stack’s valid range. If they’re not, return -1

  1. , the function returns a Stack containing the numeric characters found in the input file. Print to the standard output. The function will:

    1. Read each line from the file

    1. For each line, convert to a character array

    1. For each character array, filter non-numeric digits

    1. For each numeric character, push on the stack

Hint: the following statement will print the characters of the string to the standard output each on separate line.

” 0123! @#$”.

.: :

.: :

Grading:

.

.::;

Item

Points

toQueue

20

reverseStack

20

sumBetween

20

Handle errors

readNumericFromFile

40

Exception

100

Assignment 6 – CSc 221 – CCNY 2

Software Design Laboratory Assignment 6
$24.99 $18.99