Find Jobs
Hire Freelancers

Analyzing Answers/Writing Tiny Codes!! Budget $30----$40

$30-250 USD

Terminado
Publicado hace más de 12 años

$30-250 USD

Pagado a la entrega
Question 1 1. Here is the code for the constructor from class Spell: private int _turns; private int _hitPoints; private int _range; private int _damage; private SpellType _type; public Spell(int range, int damage, SpellType type, Game game, Point location, Random random) : base(game, location) { _type = type; if (range >= 50 && range <= 300) { _range = range; } else { _range = [login to view URL](50, 300); } if (damage >= 10 && damage <= 35) { _damage = damage; } else { _damage = [login to view URL](10, 35); } _hitPoints = [login to view URL](0.015 * (_range + _damage)); //Rounds to nearest whole number. if (_range < 150) { if (_type == [login to view URL]) { _turns = 2; } else { _turns = 3; } } else if (_range < 225) { if (_type == [login to view URL]) { _turns = 3; } else { _turns = 4; } } else if (range < 275) { if (_type == [login to view URL]) { _turns = 4; } else { _turns = 5; } } else { _turns = 5; } if (_turns < 5 && _damage > 20) { _turns++; //Increase the number of turns required to set up the spell (up to the maximum), because of the damage } } Using this code alone, complete the following blanks with **: _range _damage _type _hitPoints _turns 50 20 [login to view URL] ** ** 100 15 [login to view URL] ** ** 180 18 [login to view URL] ** ** 200 25 [login to view URL] ** ** 75 30 [login to view URL] ** ** Question 2 Given a list of Card objects: List<Card> deck = new List<Card>(); And a StreamWriter object: StreamWriter writer = new StreamWriter(@"C:\My Documents\[login to view URL]"); Which has already been populated with some number of Card objects, write a loop that will write all of the Card objects to a file using theStreamWriter object. Use the Card class' Suit and Value properties to write the cards to the file in the format: Suit of Value (e.g. A of Spades) Question 3 Write a for loop which will iterate 15 times, it doesn't matter what happens in the body of the loop, you may fill this in as you see fit (a simple comment is OK). Question 4 Write a for loop which will iterate 10 times, increasing the value of the loop counter variable by 2 on each iteration. It doesn't matter what happens in the body of the loop, you may fill this in as you see fit (a simple comment is OK).
ID del proyecto: 1312816

Información sobre el proyecto

2 propuestas
Proyecto remoto
Activo hace 12 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hi, I'm surely able to do your project. Please check your inbox for more details. Thanks.
$30 USD en 0 día
4,9 (53 comentarios)
5,1
5,1
2 freelancers están ofertando un promedio de $30 USD por este trabajo
Avatar del usuario
Hi i can deliver you the answers within an hour. Plz see PMB..
$30 USD en 0 día
5,0 (4 comentarios)
3,1
3,1

Sobre este cliente

Bandera de UNITED STATES
LAKE SAINT LOUIS, United States
5,0
3
Forma de pago verificada
Miembro desde nov 27, 2011

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.