Hello all, i need with my assignment please!!!

Hello, i need HELP with this assignment please if anyone has done it or knows how to do it PLEASE HELP, i know nothing bout C++ been doing it for only 2 months. THANK YOU

write a program that produces a plotting canvas on which some simple math functions can be plotted. The plotting canvas should have 21 rows and 76 columns which should be mapped to the rectangular area from (0,0) to (15,4). That is the bottom row (1st) corresponds to y=0 line (x axis) and top row (21st) corresponds to y=4 line. Similarly 1st column corresponds to x=0 line (yaxis) and 76th column corresponds to x=15 line. The points drawn or marked on the

canvas should be displayed with either * symbol or „o? symbol. The points that are not marked should be displayed with either . (dot) symbol or simply by space. The (0,0) location corresponds to the leftmost point of the last row (bottom) of the canvas.

the program should display a menu with the following selections and functions:

a. Plot function 1: 3.5sin(2πt/8)

When this option is selected, the program should display the

function y=3.5sin(2πx/8) on the plotting canvas. The values of

the function that falls outside of the plotting canvas (e.g. negative values) should be ignored.

b. Plot function 2: sqrt(x) When this option is selected, the program should display the

function y=3.5sin(2πx/8) on the plotting canvas. The values of the function that falls outside of the plotting canvas (e.g. negative values) should be ignored.

c. Plot function 3: (At2+Bt+C)/(t2+1) this option is selected, the program should request user to enter values of A, B, C which are real numbers. The program should ensure that the values entered must be within the following range:

A between 0 and 3

B between -2 and 5

C between 1 and 4.

Once A, B and C, the program should evaluate and display the

function display the function (At2+Bt+C)/(t2+1).

d. Exit the program.

When this option is selected, the program should perform the

following tasks:

i. Write student name and student ID to

Prog2_StudentID.txt file.

ii. Exit the program.

At the completion of first three options, the program should redisplay the

menu after a pause. If the user makes an invalid selection, the program should

display an error message redisplay the menu.
Last edited on
A floating-point array... of length 21, maximum value 76...

Storing the values of certain functions at certain points...

Translated to a 2d boolean array, dimensions 21 x 76...

Make sure during translation that the y-value is mapped to 76 - y on the 2d array...

Don't forget to include math.h...

And a function for translating between the character-wise format and the mathematical format would be good...

-Albatross
So you have no code to show us how you're going so far?
i dont know how to do anything so if someone can start it for me PLEASE !!
Havnt done anything yet, dont know how.
Thank you
or if it easy for use can yous do it PLEASE!!
2 months and you know nothing? Something like this you should be taking up with your tutor/lecturer to get some extra help / time.
i dont know how to do anything


So why exactly are you in this class? 2 months should be enough, it sounds like you haven't been trying to me.
i know general thing, but not much stuff about arrays and functions. so can someone start it for me, or at least tell me how to start it.
1
2
3
4
5
6
//include headers here

int main() {
    //your code here
    return 0;
}


There ya go.
EDIT: Check Mythios' pointers. They're going to be quite useful quite soon.

Also, check these out:
http://cplusplus.com/doc/tutorial/control/
http://cplusplus.com/reference/clibrary/cmath/
http://cplusplus.com/reference/iostream/ofstream/

Just so you know, we will not write out the whole solution for you in any programming language, which includes but is not limited to C++, C, C#, Java, J++, J#, D, Objective-C, Fortran, Prolog, Assembly, ADA, Javascript, Perl, Python, Applescript, Ruby, Forth, or any custom programming languages. That wouldn't be teaching you. :)

-Albatross
Last edited on
I wouldn't call myself a completely insane geek but, I was using dynamic_cast etc within 2 proper months of study. I think casting and what not is something that should be learned early on :) - But I guess I do see a lot of people end up with horrid tutors that just don't know how to express the knowledge they know for crap.
I wouldn't call myself a completely insane geek but, I was using dynamic_cast etc within 2 proper months of study.

Eh, just so the rest of you know, incase you didn't see, I removed that bit where I mentioned that I understood and was using dynamic_cast within 2 months of study. EDIT: It's neat, it's useful, and it's in the "Advanced" section of the C++ tutorial, which might freak a few people out.

I agree, casing should be learned early on (along with templates), but... sadly... I wonder if I could get Soulie to extend the C++ tutorial to discuss the operator and volatile keywords? I haven't seen either discussed, and they're rather useful IMO...

EDIT: Welcome to the forums, C for(int i=0, i <10, i++) cout << i;
You'll find out what that means when you read the section on control statements.

-Albatross
Last edited on
Agreed, but those 2 words would have to be kept in the advance section I'd gather.
Maybe they would have to be, but at least they'd be in the Advanced section of the tutorial of this website rather than just on mdsn, though in my opinion, the Advanced section should be renamed to "Other Concepts". That way, maybe more people would look at them; they're not as hard as their title makes them seem. As for mdsn, that's where I found out how to use the two words... am I blushing?

I'm getting of topic here. Does anybody have any libraries I can use to cover my cheeks with, so that I may help this person without embarrassment?

-Albatross
MSDN is usually pretty good for finding what you want. I've always found it pretty easy and useful. But they do have the odd page that is just atrocious.
Topic archived. No new replies allowed.