[SOLVED] SOLVED: EECS 293 Software Craftsmanship Programming Assignment 1

29.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

Programming Objective: Review of programming and data structures The objective of this assignment is to segment a text into tokens. You can assume that the text contains only printable characters. Each token is a string of length k or less. Additionally, blanks (along with newlines, carriage returns) and punctuation characters (“,.!?”) must be included in a token of unit length. For example, the text “I came, I saw, I left.” can be segmented by k=3 as `I` ` ` `cam` `e` `,` ` ` `I` ` ` `saw` `,` ` ` `I` ` ` `lef` `t` `.` . Additionally, the segmentation can be expressed numerically, where each index represents the place at which each segment occurs for the first time in the text. For example, “I came, I saw, I left.” becomes 1 2 3 4 5 2 1 2 6 5 2 1 2 7 8 9 with the legend: `I`:1, ` `: 2, `cam`: 3, `e`: 4, `,`: 5, `saw`: 6, `lef`: 7, `t`: 8, `.`: 9.
Implement a class Segmentator with the following methods:  A constructor Segmentator(Integer segment_length, String filename) that creates a Segmentator associated to the given segment length k and filename. It throws no exception.  A List

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.