Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[40 Marks total. Writing a program that generates an accurate output in A and C 20 marks. Analysis of the problem i.e. data requirements 6

[40 Marks total. Writing a program that generates an accurate output in A and C 20 marks. Analysis of the problem i.e. data requirements 6 marks. Good programming practice i.e proper use of remarks and structuring of the program modules 4 marks. Algorithm proposed in B 10 marks] A. [15 marks] Write a program that generates the positions of whitespaces in a string and prints them on the screen. For example given the following string as input: hello there my friends the program should generate: 5, 11, 14 B. [10 marks] Propose an algorithm to extract the tokens (words) from a string. Words are supposed to be separated by white spaces. C. [15 marks] Write a program that extracts the tokens from a string. Given a string as input, the program should print on the screen each token on a new line. For example given the following string as input: hello there my friends the program should generate: hello there my friends For each questions A and C in this task, first provide the analysis of the problem by clarifying the inputs, outputs and the data requirements. Then write the program and submit the source code as part of the assignment. It is important to clearly structure your program by using indentation and comments to clarify your ideas.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

Th ey told me Id have to write a lett er. Whos got time for that?

Answered: 1 week ago