Find Jobs
Hire Freelancers

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

$30-250 USD

Completed
Posted over 12 years ago

$30-250 USD

Paid on delivery
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).
Project ID: 1312816

About the project

2 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, I'm surely able to do your project. Please check your inbox for more details. Thanks.
$30 USD in 0 day
4.9 (53 reviews)
5.1
5.1
2 freelancers are bidding on average $30 USD for this job
User Avatar
Hi i can deliver you the answers within an hour. Plz see PMB..
$30 USD in 0 day
5.0 (4 reviews)
3.1
3.1

About the client

Flag of UNITED STATES
LAKE SAINT LOUIS, United States
5.0
3
Payment method verified
Member since Nov 27, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.