Skip to main content

UNISA COS3711 Practice: XML

Given the class definitions and sample XML file below, write code for the constructor and addAnimal() function of AnimalWriter to append the state of an Animal object to the XML document maintained by the animalWriter class (so that it follows the XML example given below).

The XML












animal.h




















animalwriter.h
























animal.cpp
















animalwriter.cpp







































main.cpp




Popular posts from this blog

How to create a mirror with 3ds max and V-Ray

Creating a mirror with 3ds Max and V-Ray In this tutorial we will create a simple, framed mirror with 3ds Max. We will then create the V-Ray materials for this mirror, and finally we will render out a simple 3d scene, showing reflections in the mirror. I am assuming that you have a basic knowledge of 3ds Max, so I won't explain absolutely everything, but it should still be easy enough for beginners to figure out what is going on in this tutorial. Step 1 Creating the mirror surface. Create a box in the front viewport that is approximately 70cm x 40cm x 0.4cm (Note, it doesn't have to be exactly this size and if you would prefer to work in inches or other units, that's also okay, I'm just used to working in cm.) Step 2 Create the actual V-Ray mirror material. Open up the material editor and change the first material in the material editor to a VrayMtl. Rename this material "mirror surface" and make it totally reflective, by making the reflect col

How to create a wireframe material with V-Ray

Welcome to this tutorial on making a wireframe material with V-Ray. To complete this tutorial you will need 3DS Max with V-Ray. Step 1 The fist thing we need to do is create an object that we will apply our wireframe material to, in my case I made a simple teapot. Add a camera to the scene too. Step 2 Create a normal V-Ray material. (Open up the material editor and change the first material in the material editor to a VrayMtl). Rename this material "wireframe" Step 3 Add a map to the diffuse channel of the material (by clicking the little square box next to the diffuse colour swatch). Choose the VRayEdgesTex map. Step 4 You will notice that the default colour for the VRayEdgesTex map is white. (This means the wires of the wireframe material will be white. You can change it to any colour you like, but let us leave it as white for now. Notice too that you can change the thickness/units of the VRayEdgesTex map and that you can choose to show the hidden edges too. (t

Tutorial: How to make a shadow matte with V-Ray

Welcome to this tutorial on making a shadow matte with V-Ray. To complete this tutorial you will need 3DS Max 2008 or newer, with V-Ray 1.5 and Adobe Photoshop. The purpose of this tutorial is to show you how to render out a 3D object, with its shadow included in an alpha channel, so that you can composite the 3D object and it's shadow on top of an existing photograph. You will need to download the "vray shadow matte tutorial.rar" file from: http://www.turbosquid.com/FullPreview/Index.cfm/ID/473854 In this file you will find two 3ds max files, a background photo and some additional info. Please note that the max file used in this tutorial uses the V-Ray LWF (Linear Work Flow) technique, as described on the chaosgroup forums (www.chaosgroup.com). To use LWF you need to change 3DS Max's Gamma settings - please see the included file called "LWF_gamma_settings.jpg" to see what your settings should be. (You can change the Gamma settings in 3DS Max under: