Open the Dev C++ (while taking this Quiz with Honorlock acti…
Open the Dev C++ (while taking this Quiz with Honorlock activated), then write a simple program that displays “Hello world!” to the output console. Upload your source code file (.cpp file) for credits. *** Notes:If you can’t use the IDE (Dev C++, Xcode, etc…) during the quiz, use the online C++ compiler instead: https://www.onlinegdb.com/online_c++_compiler.
Read DetailsWrite a static method for SpacePirate called formNewCrew. Th…
Write a static method for SpacePirate called formNewCrew. The method takes two parameters – an array of SpacePirates that will form the new crew and a String representing the new crew’s spaceship – and it returns nothing. For every SpacePirate in the given array, the method should update its associated spaceship and crewSize. The method should finally print: “The crew of the [spaceship] has been created”.
Read DetailsWrite a constructor for Pirate. The constructor will take th…
Write a constructor for Pirate. The constructor will take the name, bounty, and gold, and set all instance variables appropriately. If the bounty or gold is negative, set the instance variables to 0 instead. The constructor should also update the pirateCount variable to reflect that a new Pirate exists. Note: even though the class is abstract, this doesn’t affect anything on the constructor. You can treat the class as any concrete class in this particular question.
Read DetailsWrite a concrete toString method for Pirate. The String repr…
Write a concrete toString method for Pirate. The String representation of a Pirate is “My name is [name], and the bounty on my head is [bounty]. I have [gold] gold to my name” (without the square brackets, replacing the square brackets with the values from the indicated instance variables).
Read Details