+1 480 409 0818 
Online Algorithm Assignment Helper
1833 Order Completed
99 % Response Time
201 Reviews
Since 2012

Online Algorithm Assignment Helper

Illinois, USA

Luther H

PhD. in Programming, University of Illinois, USA

Profession

Online Algorithm Assignment Helper

Skills

I have accumulated massive experience working as an algorithm assignment helper for ProgrammingHomeworkHelp.com. This journey began 10 years ago after I quit my day job as a lecturer at a local university. Since then, I have provided academic assistance to students from all corners of the globe, enabling them to secure their dream grades and become better in this academic area. I have delivered over 1830 assignment orders and I am ready to take up, even more, to help students achieve academic excellence. I keenly follow the instructions given to me by my clients to provide the best academic support. I strictly keep deadlines to help students submit their assignments in the best time possible.

Get Free Quote
0 Files Selected

Dynamic variables and composition

#include #include #include #include #include #include "Move.h" #include "Pokemon.h" #include "PokemonTrainer.h" using namespace std; // Load the pokemons from file void loadPokemons(const string &filename, Pokemonpokemons[5]) { // Load the pokemons from file ifstreaminFile("pokemonList.txt"); if (!inFile.is_open()) { cout<< "Failed to open file." <>move.damage; pokemons[i].addMove(move); } } inFile.close(); } // Let the user select a pokemon to add to their team void initializeTrainerPokemons(PokemonTrainer&trainer, Pokemonpokemons[5]) { cout<< "List of Pokemons to choose" <> number)) { cout<< "Invalid option." <= 0 && number < 5 && !chosenPokemons[number]) { trainer.addPokemon(pokemons[number]); break; } cout<< "Invalid option." <= 3) { // No more pokemons left cout<< "You have no pokemons left. You lose!" <= 0) break; cout<< "Error: Invalid move." < using namespace std; // Default constructor Pokemon::Pokemon() : name(""), health(0), numMoves(0) { } // Create a pokemon Pokemon::Pokemon(const string &name, int health) : name(name), health(health), numMoves(0) { } // Add a move for the pokemon void Pokemon::addMove(const Move &move) { if (numMoves>= 3) return; moves[numMoves++] = move; } // Get the pokemon's health int Pokemon::getHealth() const { return health; } // Return the pokemon's name string Pokemon::getName() const { return name; } // Return the first move Move Pokemon::getFirstMove() const { return moves[0]; } // Return the second move Move Pokemon::getSecondMove() const { return moves[1]; } // Return the third move Move Pokemon::getThirdMove() const { return moves[2]; } // Attack the target pokemon void Pokemon::move(int index, Pokemon&target) { if (index < 0 || index >= 3) return; target.health -= moves[index].damage; if (target.health< 0) target.health = 0; } // Print the moves void Pokemon::displayMoves() const { for (int i = 0; i using namespace std; // Default constructor PokemonTrainer::PokemonTrainer() { maxNumberPokemons = 3; currentNumberPokemons = 0; indexPokemonFighting = 0; teamHealth = 0; pokemons = new Pokemon[maxNumberPokemons]; } // Copy constructor PokemonTrainer::PokemonTrainer(const PokemonTrainer&other) { maxNumberPokemons = other.maxNumberPokemons; currentNumberPokemons = other.currentNumberPokemons; indexPokemonFighting = other.indexPokemonFighting; teamHealth = other.teamHealth; pokemons = new Pokemon[maxNumberPokemons]; for (int i = 0; iteamHealth = teamHealth; } // Get the team health int PokemonTrainer::getTeamHealth() const { return teamHealth; } // Get the maximum pokemons a trainer can hold int PokemonTrainer::getMaxNumberPokemons() const { return maxNumberPokemons; } // Return the number of pokemons left int PokemonTrainer::getCurrentNumberPokemons() const { return currentNumberPokemons; } // Return the index of pokemon fighting int PokemonTrainer::getIndexOfCurrentPokemonFighting() const { return indexPokemonFighting; } // Add a new pokemon to the team void PokemonTrainer::addPokemon(const Pokemon&pokemon) { if (currentNumberPokemons>= maxNumberPokemons) return; pokemons[currentNumberPokemons++] = pokemon; teamHealth += pokemon.getHealth(); } // Display the team void PokemonTrainer::displayTeam() const { cout<< "Pokemon Team" <= currentNumberPokemons) indexPokemonFighting = 0; }

Data storage and computation in 1D arrays

#include #include #include using namespace std; int valid_rows = 0; void read_from_file(ifstream&input_file, double gallons[], double miles[]) { string line, temp; double num; int totalValid = 0, lineCount = 0, i, currentCol = 0, k = 0; double gallon_val = 0, mile_val = 0; while(getline(input_file,line)) { stringstream s; s << line; lineCount++; currentCol = 0; gallon_val = 0; mile_val = 0; while (!s.eof()) { s >> temp; stringstream(temp) >> num; if(lineCount == 1) totalValid = num; else { if(currentCol % 2 == 0) gallon_val = num; else mile_val = num; } temp = ""; currentCol++; } if(currentCol>= 1) { if(gallon_val>= 1 &&mile_val>= 1) { gallons[k] = gallon_val; miles[k] = mile_val; valid_rows++; k++; } } } cout<< "\nTotal valid rows mentioned in file: "< array[i]) min = array[i]; } return min; } double max(double array[], int N) { double max = array[0]; for(int i = 1; i< N; ++i) if(max < array[i]) max = array[i]; return max; } double slope(int count, double x, double y, double xy, double xx) { double slope = double((count*xy- x*y)) / double((count*xx - x*x)); return slope; } double intercept(int count, long x, double y, double xy, double xx) { double Yintercept = double((y*xx - x*xy)) / double((count*xx - x*x)); return Yintercept; } int main(int argc, char** argv) { double gallons[100], miles[100]; if(argc == 1) cout<< "Please enter filename in the arguements. Invalid Entry!"< 2) cout<< "Too many command line arguement. The program needs just the filename as the argument."<maxX: " < " <maxY: " < " <