Translate

Thursday, August 15, 2013

Widgets

Pseudocode for my Game Logic Class

class DogKennelProfits


main()

    // Declarations

        string name

        num largeDogs

              num smallDogs

               num REVENUE

        num EXPENSES

        num DIFFERENCE


output “Enter number of Large Dogs”


input largeDogs // Where user inputs amount of Large dogs.


if

     num largeDogs > 8 // Max capacity is 8.

     output “Max number of dogs allowed is 8” // Mssg that appears

else

    output largeDogs // Total largeDogs.

endif


Output “Enter number of Small Dogs”


input smallDogs // Where user inputs amount of small dogs


if

    num smallDogs = > num largeDogs + num smallDogs = 8

    output “Max number of dogs allowed is 8”

else

    output smallDogs

endif


output REVENUE = (num largeDogs * 25 + (8 - num largeDogs * 20) // Total profit

output EXPENSES = (30 + 16) // Total expenses

output DIFFERENCE = (REVENUE - EXPENSES) // Final profit

endClass