logo

ALGORITHMS AND FLOWCHARTS (PDF)

   

Added on  2021-05-31

11 Pages1265 Words81 Views
AlgorithmStep 1:Start the programStep 2: Read all the lines from input file and stored into playerListStep 3:Infinite loop startStep 4: Display the menu (a – add new player, s – search player, v – visualize the data, q – quit)Step 5: read the userChoiceStep 6: Check if userChoice is “q”, then go to Step 18, else go to Step 7Step 7: Check if userChoice is “a”, then go to Step 8, else go to Step 10Step 8: CALL addPlayer MethodStep 9: Go to Step 17Step 10: Check if userChoice is “s”, then go to Step 11, else go to Step 1Step 11: CALL searchPlayer MethodStep 12: Go to Step 17Step 13: Check if userChoice is “v”, then go to Step 14, else go to Step Step 14: CALL displayVisual MethodStep 15: Go to Step 17Step 16: Print Invalid menu choiceStep 17: Continue the loop, go to Step 3Step 18: Display the Bye MessageStep 19: End of the program

Function addUser()Step 1: Set IsContineue to yStep 2: While IsContinue == ‘y’, if not, Go to Step 16Step 3: Read the PlayerIDStep 4: Check if PlayerID has the length of 9, then go to Step 5, else go to Step 12Step 5: Check if the IsPlayerIDExists(), then go to Step 6, else go to Step 10Step 6: Read the player name, age, height and weightStep 7: Store the player details into input fileStep 8: print the Player details into screenStep 9: go to Step 15Step 10: Print “Player ID already exists, please re-enter it” messageStep 11: Go to Step 15Step 12: Print “Player ID should be nine digit” messageStep 13: Go to Step 15Step 14: Read “Do you want to enter details for another player (Y/N)?”, IsContinueStep 15: Go to Step 2Step 16: Return to MainEnd Function

Function searchPlayer()Step 1: Set searchContinue to yStep 2: While searchContinue == ‘y’, if not, Go to Step 9Step 3: Read the pidStep 4: Check if the IsPlayerIDExists(), then go to Step 5, else go to Step 10Step 5: Print the Player detailsStep 6: Go to Step 8Step 7: Read “Do you want to search for another player (Y/N)?”, searchContinueStep 8: Go to Step 2Step 9: Return to MainEnd Function

Function displayVisual()Step 1: Set displayContinue to yStep 2: While displayContinue == ‘y’, if not, Go to Step 13Step 3: Print the “1. Age 2. Height 3. Width”Step 4: Read “The visual attribute menu “,categoryStep 5: Check if category=1, then go to Step 6, else go to Step 11Step 6: Print the Histogram chart using age listStep 7: Go to Step 11Step 8: Print the Histogram chart using Height listStep 9: Go to Step 11Step 10: Print the Histogram chart using weight listStep 11: Read the “Do you want to display the visualization(y/n) ?”, displayContinueStep 12: Go to Step 2Step 13: Return MainEnd Function

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Programming in Java Assignment
|15
|2137
|33

JAVA ASSIGNMENT
|18
|1830
|69

JAVA ASSIGNMENT
|18
|1844
|391

JAVA ASSIGNMENT
|18
|1815
|327

Fundamentals of Operating Systems and Java Programming
|14
|857
|463

Document Related to JAVA Programming
|15
|1971
|338