Bn108bn108d programming for networking assignment define a


Programming for Networking Assignment

Purpose - This assignment assesses the basic concepts of programming; students should be able to demonstrate their achievements in the following

a. describe the fundamental principles of object-oriented programming;

b. interpret a user's needs while dealing with simple program specifications;

c. design a simple class using UML notation;                                                                       

d. create a simple application based on UML design and the incremental development process of coding, debugging, and testing;

e. apply basic control structures - sequence, repetition, and selection - to program development;

f. produce simple interactive applications.

This assignment will give you practice with interactive programs, if/else statements, methods that return values, String methods and while loops.

Benjamin is looking at developing a simple guessing game. The idea behind that the game is that the program generates a random number and allows the user to make guesses until the user gets it right. For each incorrect guess, the program tells the user whether the right answer is higher or lower as shown in the example log of execution.

Task requirements -

1. Design a UML class diagram that meets the program specification given above

2. Translate your design above to Java. The program should be stored in a file called MITnnnnnGuess.java where MITnnnnn is your MIT student ID.

3. Define a class constant for the maximum number (MAX_GUESS) that the user can guess.

4. Correctly implement the following static methods in addition to method main:

A method that generates a random number between 1 and maximum number defined in 2 (this method has been generated for you) a method to give instructions to the user a method to play one game with the user

5. When you ask the user whether or not to play again, you should use the "next()" method of the Scanner class to read a one-word answer from the user. You should continue playing if this answer begins with the letter "y" or the letter "Y". Notice that the user is allowed to type words like "yes". You are to look just at the first letter of the user's response and see whether it begins with a "y" or "n" (either capitalized or not) to determine whether to play again.

6. At the end of the log you are to report various statistics about the series of games played by the user, these being the total number of games played (use a variable to keep track of this), the total number of guesses made (use another variable to keep track of this), and the average number of guesses per game.

Attachment:- Assignment Files.rar

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Bn108bn108d programming for networking assignment define a
Reference No:- TGS02629727

Expected delivery within 24 Hours