Question: The following program, write the code in C++, please do it well, make sure you show all steps and how you did it. Please make

The following program, write the code in C++, please do it well, make sure you show all steps and how you did it. Please make the code such that I can copy paste it. Also please show the output as well, as sometimes the code is given but there is not a correct output, so show a screenshot of your output and that it matches everything asked in the question.

The following is the introduction to the assignment that is required for various tasks but you only have to do the fourth and fifth right now. I have already done the other tasks, so I will send the main.cpp for that (as the cpp and header files for box checkerboard isnt really needed) and for this you have to build on the code and add on the files for the codes for taskd. You have to add the functions for these codes for it to run and compile. The codes for task d and e should be added to it. Please follow all these directions, and make sure all files that I have sent the code of are present and list the names of the files you have and the code for it

This is the intro to the assignment:

For this assignment, you will have to create a Makefile to build your project. It should create a single executable named main.

The main function should call all the functions that accomplish the tasks. Those functions may not be written in main.cpp but rather you should create at least one additional .cpp/.h file(s).

Write a function for each of the tasks. The functions should accept parameters for the assorted dimensions and should return a std::string with a string representing the output. Recall that you can embed a newline in a string to move to the next line.

The main function should call each task function one or more times and print out the results to show that everything works.

For example, for task A you might write a routine with a prototype std::string box(int width, int height).

You might test it from main as follows:

The following program, write the code in C++, please do it well,

Note: Remember that your program should not ask for any keyboard input. When run it should clearly show that all tasks are implemented and work.

IMPORTANT: NO USER/KEYBOARD INPUT, REMEMBER THAT WHEN MAKING THE CODE

Following all directions above, this is Task A that I have completed and below this instructions I will send the code I did for this task

This is my code, with the name of the files listed, the code of the files and the output, (look at all this carefully, this is the platform you will make the codes for task d for)

Makefile:

CXX = g++

CXXFLAGS = -std=c++11

OBJS = main.o box.o

all: main

main: $(OBJS)

$(CXX) $(CXXFLAGS) -o main $(OBJS)

main.o: main.cpp box.h

$(CXX) $(CXXFLAGS) -c main.cpp

box.o: box.cpp box.h

$(CXX) $(CXXFLAGS) -c box.cpp

clean:

rm -f $(OBJS) main

#include

#include "box.h"

#include "checkerboard.h"

#include "cross.h"

int main()

{

//Task A: box

std::string result;

result = box(6, 5);

std::cout

std::cout

std::cout

//Task B: checkerboard

std::cout

result = checkerboard(8, 4);

std::cout

std::cout

//Task C: cross

std::cout

result = cross(9);

std::cout

std::cout

//Task D Function here:

//Task E function here:

}

(as said in the comment for main.cpp I made the cpp file for the first task tasks which is the cpp file for these tasks, and then you have to make the task d and e cpp files as i wrote in comments. This is in addition to the functions you add in main.cpp as well as the header files you should make for the functions)

These are the two tasks you have to do for task d and e in which the above directions apply:

make sure you show all steps and how you did it. Pleasemake the code such that I can copy paste it. Also please

Please follow all directions well, make all the files and functions as asked and make sure when ran together it runs, list the name of the files and the code following it beneath when you send it. There should be the makefile that I already have, the updated main.cpp with added functions, and the cpp files for the other tasks and any additional header files needed. Follow all directions well, please.

Overall: the box.cpp, checkerboard.cpp and cross.cpp I made for first 3 tasks is not necessary but the files you should be sending are the updated main.cpp with added functions, the lower.cpp and lower.h and upper.cpp and upper,h. Please send the screenshot of the output as well, so i know it works and make sure the code compiles.

MAKE SURE NO USER INPUT, IT SHOULD BE HARD CODED AS WELL, AND THERE SHOULD BE THE CPP AND HEADER FILES, AS WELL AS THE FUNCTIONS ADDED TO MAIN. FOLLOW ALL DIRECTIONS WELL, AND READ EVERYTHING, URGENT.

// more code up here std::string result; result = box (3,5); std: : cout "box (3,5): "; std: :cout result std: : cout " ------------- "; // seperator // more tests to show that box works fully could be added // more code down here Vrite a program lower.cpp that prints the bottom-left half of a square, given the side xample: Input side length: 6 Shape: Task E. Upper triangle Write a program upper.cpp that prints the top-right half of a square, given the side length . Example: Input side length: 5 Shape

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!