CS-224 Object Oriented Programming and Design Methodologies (Solution)

$ 24.99
Category:

Description

Assignment 01
1 Guidelines
• You need to do all the assignments alone
• You will submit your assignment to git-hub (we will give more details soon)
• You need to follow the best programming practices as given in the accompanying document and it is also present on LMS. Failure in doing so will have your marks deducted.
• Some assignments will require you to submit multiple files. Always Zip and send them.
• It is better to submit incomplete assignment than none at all.
• It is better to submit the work that you have done yourself than what you have plagiarized.
• It is strongly advised that you start working on the assignment the day you get it. Assignments WILL take time.
• Every assignment you submit should be a single zipped file containing all the other files. Suppose your name is John Doe and your id is 0022 so the name of the submitted file should be JohnDoe0022.zip
1
• You can be called in for Viva for any assignment that you submit
2 Task 1
See the code as given Assignment01_SampleCode.cpp. Once you run the code, you can see that a file linegraph.txt is generated. You should now try to understand the code on your own and test it to see what happens when you make changes to it. Once understood, you are to produce a file, namely graph.txt which will contain a sine graph. For reference, kindly see graph.txt as given in the assignment folder.
3 Task 2
Suppose you are given any valid mathematical expression is a character array as given below:

char exp[] = “24*356+489*5/45*54”;

write code such that you can separate the operands out as integers in a separate integer array and the operators in a separate character array. According to the case above, the integer array will contain the values:
24 356 489 5 45 54
and the character array will contain the values:
* + * / *
You can define the integer array and the character array of length 64. The code should work for any valid expressions showing a valid output. You do not need to calculate the expression but you can choose to do it as a challenge for yourself.
2

Reviews

There are no reviews yet.

Be the first to review “CS-224 Object Oriented Programming and Design Methodologies (Solution)”

Your email address will not be published. Required fields are marked *