Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Program In this problem, you are asked to write a program makeSVG.cpp that creates a scalable vector graphics (svg) file with shapes based on

C++ Program

In this problem, you are asked to write a program makeSVG.cpp that creates a scalable vector graphics (svg) file with shapes based on input read from standard input. An svg file can be visualized using a browser such as Firefox, Safari, Chrome or Internet Explorer. See https://en.wikipedia.org/wiki/Scalable_Vector_Graphics. Your svg file should use the same template as template.svg. Each line of input defines a shape to be added to the line(s) indicated in template.svg.

The first character on each line determines whether the shape is a circle (C) or a rectangle (R). The position and size of the shape is described by integers in the rest of the input line. A rectangle is specified by the position of its lower left corner, its width and its height. Example: Rectangle with corners at (10,20), (40,20), (40,60), (10,60) R 10 20 30 40 A circle is specified by the position of its center and its radius Example: Circle centered at position (30,40) with radius 20 C 30 40 20 It can be assumed that input will consist of valid characters (only R or C) and the appropriate number of positive integers. Use the test cases to check your program and match the test svg files exactly.

/////////////////////////////////////// template.svg code:

xmlns="http://www.w3.org/2000/svg">

fill="white" fill-opacity="0.5" stroke="black" stroke-width="2">

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago

Question

Explain the various techniques of Management Development.

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago