SuperTutor

(15)

$15/per page/Negotiable

About SuperTutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,Engineering,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 327 Weeks Ago, 5 Days Ago
Questions Answered: 12843
Tutorials Posted: 12834

Education

  • MBA, Ph.D in Management
    Harvard university
    Feb-1997 - Aug-2003

Experience

  • Professor
    Strayer University
    Jan-2007 - Present

Category > Programming Posted 18 May 2017 My Price 9.00

2-dimensional Arra

C++ programming:

Task 1:

Photos taken in space by the Pathfinder spacecraft are sent back to earth as a stream of numbers. Each number represents a level of brightness. A large number represents a high brightness level, and a small number represents a low level. Your job is to take a matrix (two-dimensional array) of the numbers and print it as a negative picture. If the numbers received represent levels of brightness, then one approach to generating a picture is to print a dark character (like a $ ) when the bright level is low, print a medium character (like a *) when the level is medium, and print a light character (like a blank) when the level is high.

- ‘ $ ’ : when bright level is greater than or equal to 5.

- ‘ * ’ : bright level is between 2 and 4 (including 2 and 4).

- ' ': bright level is less than equal to

 

Input: A text file “imagedata.txt" that contains 20 X 20 integer array of brightness.

Output: The program should display the following output.

(please see attachment for more details)

 

Task 2:

2-dimensional Array (Check/Correct error pixels)

Unfortunately, errors in transmission sometimes occur. Thus your program should find and correct these errors. Assume a value is in error if it differs by more than one from each of its four neighboring values. Correct the erroneous value by giving it the average of its neighboring values,rounding it to the nearest integer.

(please see attachment for more details)

 

Thank you very much!!

 

Program 2-1: 2-dimensional Array (Task 1: Convert int 2-d array to char 2-d array)Problem:Photos taken in space by the Pathfinder spacecraft are sent back to earth as a stream ofnumbers.Each number represents a level of brightness.A large number represents a high brightnesslevel, and a small number represents a low level. Your job is to take a matrix (two-dimensional array) ofthe numbers and print it as a negative picture. If the numbers received represent levels of brightness,then one approach to generating a picture is to print a dark character (like a $ ) when the bright level islow, print a medium character (like a *) when the level is medium, and print a light character (like ablank) when the level is high.-‘$’: when bright level is greater than or equal to 5.-‘*’: bright level is between 2 and 4 (including 2 and 4).-‘‘: bright level is less than equal to 1.Input:A text file“imagedata.txt" that contains 20 X 20 integer array of brightness.Output:The program should display the following output.Task 10 1 5 0 0 0 0 0 1 1 1 1 0 1 0 4 4 1 1 10 5 4 4 0 0 0 0 0 0 0 6 0 0 6 3 4 0 6 06 5 1 4 4 0 0 5 6 6 6 0 0 6 4 3 4 5 1 16 0 0 1 4 6 5 0 1 0 1 7 7 4 0 0 0 5 0 10 0 3 0 1 5 1 0 7 0 1 0 6 4 0 0 0 4 0 11 0 0 0 5 3 0 0 1 5 0 0 0 6 0 0 0 0 0 10 4 0 7 0 1 5 5 1 0 7 6 1 0 7 0 0 1 0 10 0 0 8 0 1 6 6 1 0 7 5 1 0 8 0 0 0 0 10 4 0 7 1 7 1 0 1 0 4 0 1 0 8 0 1 1 0 01 0 0 6 1 1 0 0 0 9 0 1 1 0 8 0 1 1 6 00 3 0 6 0 1 3 9 5 5 4 4 1 0 7 0 1 1 0 01 0 1 6 1 1 0 3 3 3 3 0 1 0 7 4 1 3 0 00 1 1 5 1 0 0 0 0 9 0 9 0 0 7 0 1 0 0 01 0 1 3 3 4 3 4 3 3 3 4 4 3 3 0 1 0 4 00 5 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 06 0 0 7 0 7 7 8 1 5 0 1 1 7 0 0 0 8 6 76 0 0 6 0 7 0 0 1 8 0 1 1 7 0 0 0 8 1 85 6 7 6 0 6 6 8 4 7 0 1 1 7 0 5 0 4 0 86 0 1 7 0 7 0 0 0 7 0 4 0 8 0 0 0 7 0 75 1 0 6 0 7 6 8 0 7 7 6 0 8 8 7 0 7 6 7$* *$ * *$$ * *$$ $* *$ $ $ $$ * * * $$* $ $$ $ *$*$$$ **$ *$$*$$ $$ $$$$ $$ $$*$$*$$$$$*$* $ $ $ * *$$* * * *$ **$$$$* * * * * * * * * * * **$$$$ $ $$$$ $ $$$$$$$$$ $ $ $$ $ $ * $$$*$$$$$*$$$$$$ $ $$ $ $$ $ $$ $ $

0 1 5 0 0 0 0 0 1 1 1 1 0 1 0 4 4 1 1 10 5 4 4 0 0 0 0 0 0 0 6 0 0 6 3 4 0 6 06 5 1 4 4 0 0 5 6 6 6 0 0 6 4 3 4 5 1 16 0 0 1 4 6 5 0 1 0 1 7 7 4 0 0 0 5 0 10 0 3 0 1 5 1 0 7 0 1 0 6 4 0 0 0 4 0 11 0 0 0 5 3 0 0 1 5 0 0 0 6 0 0 0 0 0 10 4 0 7 0 1 5 5 1 0 7 6 1 0 7 0 0 1 0 10 0 0 8 0 1 6 6 1 0 7 5 1 0 8 0 0 0 0 10 4 0 7 1 7 1 0 1 0 4 0 1 0 8 0 1 1 0 01 0 0 6 1 1 0 0 0 9 0 1 1 0 8 0 1 1 6 00 3 0 6 0 1 3 9 5 5 4 4 1 0 7 0 1 1 0 01 0 1 6 1 1 0 3 3 3 3 0 1 0 7 4 1 3 0 00 1 1 5 1 0 0 0 0 9 0 9 0 0 7 0 1 0 0 01 0 1 3 3 4 3 4 3 3 3 4 4 3 3 0 1 0 4 00 5 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 06 0 0 7 0 7 7 8 1 5 0 1 1 7 0 0 0 8 6 76 0 0 6 0 7 0 0 1 8 0 1 1 7 0 0 0 8 1 85 6 7 6 0 6 6 8 4 7 0 1 1 7 0 5 0 4 0 86 0 1 7 0 7 0 0 0 7 0 4 0 8 0 0 0 7 0 75 1 0 6 0 7 6 8 0 7 7 6 0 8 8 7 0 7 6 7

Attachments:

Answers

(15)
Status NEW Posted 18 May 2017 12:05 AM My Price 9.00

-----------

Attachments

file 1495069388-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)