Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a program that can be solved using while loops or for loops ( or both ) and string operations. Your program will process a

Design a program that can be solved using while loops or for loops (or both) and string operations. Your program will process a long string with a fixed structure, whose parts are separated using specific characters. The string will contain at least five objects of the same kind and use a structure to describe the objects. The program will search through the string, and perform at least two types of operations, one about string operations such as searching for something or encrypting a text, one about performing mathematical computations such as finding the average, total, or largest value etc. Your problem should reflect a real-world operation. Below is an example:
String: John Smith,31,manager,55000; Alex Hoover,25,staff,40000;Jane Meyer,40,staff,45000;
Task 1: Find if there is an employee named Alex Hoover. If so, display all information
Task 2: Find the average salary of all employees
Other examples:
search for a book in a particular field and find average prices of all books;
Find if there is a movie being played in a theater, and display total income from that movie; ...
Rubric
Create a function for each task, thus your program will have at least two functions. (5')
The string contains information of at least five objects. The only hard coded value is the initial string value, and the value to search for, such as the employee name, book name, movie name etc. The rest must be retrieved through coding. (10')
Cannot hard code indexes, e.g. you must use a function or method to retrieve the index of a semicolon. (5')
Must have at least one loop structure. (10')
Have a utility file and group all the function definitions in this file (10')
Program runs successfully and generates correct output (30')
Follow professional coding standards (10')
Use pseudocodes to describe your algorithm design. Same requirements as in Assignment 2.(20')
image text in transcribed

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

Step: 3

blur-text-image

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

Describe Balor method and give the chemical reaction.

Answered: 1 week ago

Question

How to prepare washing soda from common salt?

Answered: 1 week ago