Write a program in C++

User Generated

xknahfun1111

Computer Science

Description

Please follow the step by step easy to follow instructions of #2 only.

Please provide comments in the code.

Unformatted Attachment Preview

CSCE 121-700: Introduction to Program Design and Concepts Fall 2017 Homework 8 Due Wednesday, Nov 8, 11:59 PM. Review the General Instructions! Do both of the below: 1. Read zyBook Chapters 26 & 27 (all sections, including those marked “optional”) and complete all associated Activities (Participation and Challenge) 2. Create a new program (hw8-pr2) using the following steps: o STEP 1: Copy (from PPP.zip) and rename the following FLTK Graphics Interface Library h & cpp files:          o Graph.h&cpp  myGraph.h&cpp GUI.h&cpp  myGUI.h&cpp Point.h  myPoint.h Simple_window.h&cpp  mySimple_window.h&cpp Window.h&cpp  myWindow.h&cpp sample_main4.cpp.bell  hw8-pr2.cpp image.JPG  image.JPG (DO NOT RENAME) snow_cpp.GIF  snow_cpp.GIP (DO NOT RENAME) std_lib_facilities_4.h  std_lib_facilities_4.h (DO NOT RENAME) STEP 2: Edit the “#include” statements in the various h & cpp files for the new file names (and make sure there are none of the original named h & cpp files in your work folder. Now compile (on build.tamu.edu) hw8-pr2.cpp using the following command line, and then run the resulting hw8-pr1 executable to the 12th Canvas to produce the below picture: g++ hw8-pr2.cpp myGraph.cpp myGUI.cpp mySimple_window.cpp myWindow.cpp -lfltk -lfltk_images -o hw8-pr2 The above display has the X-axis at 30,30. Here is the display with the X-axis at 30,300: o STEP 3: Edit myGraph.h and myGraph.cpp to make the Shape move member function a Pure Virtual Function. To do this you will need to change the declaration of the Shape move function in myGraph.h and remove the definition of the Shape move function from myGraph.cpp. Then you will need to make all required changes to myGraph.h&cpp to add the move function declaration and definition to all structs/classes directly derived from Shape (i.e. directly inheriting from Shape). NOTE!!! One complication you will need to deal with is that the original Shape move function definition directly accessed the private Shape points vector (which as a Shape member function it could do), however the Shape points vector can NOT be directly accessed by the child structs/classes. YOU ARE NOT ALLOWED TO CHANGE THE PROTECTION ON THE SHAPE POINTS VECTOR! To initially prove the successful completion of this step recompile hw8-pr2.cpp using the above command and rerun the resulting hw8-pr2 executable to produce the above picture. o STEP 4: At the end of hw8-pr2.cpp (before the line “return 0;”) add additional code to change the window label to “HW8-PR2” and to move each of the 13 objects attached to the window 40 points to the right and 10 points up. Then add “win.wait_for_button();” to redraw the window. Finally, recompile hw8-pr2.cpp using the above command and rerun the resulting hw8-pr2 executable to produce the below picture: The above display has the X-axis at 30,30. Here is the display with the X-axis at 30,300: Each of the above is worth 80 points, for a total of 160 points. For Problem 1 your score will be 80 points multiplied by your completion percentage for Chapters 26 & 27 (all sections, including those marked “optional”) as measured at 11:59pm on 11/8/17. For Problem 2 the result of the program grading rubric will be used.
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Similar Content

Related Tags