PROG 1101C Programming Concept Assignment

Assignment Help JAVA Programming
Reference no: EM132392298

PROG 1101C Programming Concept Assignment - University Of Technology, Mauritius

For both questions, Q1 and Q2, you are strongly advised to use methods and multi-file/class approach.

Q1. YOU WILL BE HANG GAME

Write an algorithm + a JAVA program to implement the 'YOU WILL BE HANG' game.

The game will be played between two players (P1 & P2) at a time but in your game you can cater for a maximum of four (4) players i.e. P1, P2, P3, and P4.

Let us assume P1 plays against P2.

P1 asks P2 how many letters long word P2 wishes to play; the longer the word, the more will be the score for the winner.

While P1 types in the word, he/she should hide it from P2 and at the same only asterisk symbols will be displayed.

E.g. If P2 asks for 11 characters word;

P1 types the Word: ***********

If P2 wins, the full word is displayed: COMPOSITION; else for each wrong characters guessed by P2, successive characters from the following phrase '' is displayed until P2 is hanged and loses the game. Subsequently P1 obtains the equivalent marks and wins the game.

The game can be played repeatedly between the two players in several rounds and their scores for each round and the overall are displayed as well as the winner of each round and the overall.

The complexity of the program and the game can be increased by proposing four players (P1, P2, P3, and P4) and saving their stats permanently in an output file.

Your report should include -

(i) A copy of all algorithms and/or flowchart, program specification,

(ii) Your FULL JAVA code

(iii) Your test cases + appropriate files for testing purposes

(iv) Output screen - screen shots

(v) Conclusion.

Q2. Compression - Run Length Encoding (RLE)

Write an algorithm and a corresponding JAVA program which takes an input sequence of characters from the alphabet {A,B,C...Z} and compresses it by replacing each subsequence of a particular character by a single occurrence of the character, and the frequency of occurrence of that character.

e.g. Input : AAAAABBBBBBBCCBBBAABBCCCCCS (27 x 8 bits = 216 bits)

Output: A5B7C2B3A2B2C5 (14 x 8 bits = 112bits)

Assuming that each character uses an 8-bit ASCII code your program should also calculate the percentage of compression.

Your report should include

(i) A copy of all algorithms and/or flowchart, program specification,

(ii) Your FULL JAVA code

(iii) Your test cases + appropriate files for testing purposes

(iv) Output screen - screen shots

(v) Conclusion.

Attachment:- Programming Concept Assignment File.rar

Reference no: EM132392298

Questions Cloud

What federal agency is evaluating mobile tracking : What federal agency is evaluating mobile tracking technology as part of its ongoing mission to protect consumer privacy?
What type of research would this company be conducting : The owner of Tools by Joe has hired a company to help him find out whether customers and potential customers would prefer to shop in his store or online.
Approach to ethical and socially responsible behaviour : From your consumer perspective, provide an example of a company you purchase from, in part, because you agree with or support their approach
What types of marketing communications : What types of marketing communications may be necessary to launch an innovative product such as Procter & Gamble's PUR in emerging markets?
PROG 1101C Programming Concept Assignment : PROG 1101C Programming Concept Assignment Help and Solution - University Of Technology, Mauritius. Compression - Run Length Encoding
Hellofresh and ubereats : What are the differences and similarities between HelloFresh and UberEats?
Festival complements other forms of on-site engagement : General user engagement with an event or festival complements other forms of on-site engagement. The Dark MOFO case study in particular illustrates
Explain the impact of e-commerce technology : Identify and explain the impact of e-commerce technology in current business world?
Discuss the role of culture in cross border businesses : Discuss the role of culture in cross border businesses. Does it impact ethics and corruption?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Develop classes with the instance variables and methods

Develop three classes with the instance variables and methods - develop the Television and RemoteControl classes. You will demonstrate their functionality

  Determine if strings are equal

Complete the recursive method match in the code below which will determine whether or not two strings match.

  Write a program called product1ton

Write a program called Product1ToN to compute the product of integers 1 to 10 (i.e., 1×2×3×...×10). Try computing the product from 1 to 11, 1 to 12, 1 to 13 and 1 to 14.

  Complete the code to counts the number of lines input

Complete the code to counts the number of lines input by a user until the user enters the string ENDOFDATA (must be uppercase letters, no spaces) on a line by itself.

  Java program to read line of text which ends with period

Write down the java program which will read the line of text which ends with the period, which serves as sentinel value. Show all the letters which occur in the text.

  Bubble sort on the same machine

final-au13.dvifinal-au13.dvi A) If it takes me 3 seconds to sort 1000 data points using a bubble sort (which is an O(n2) algorithm), roughly how long should it take me to sort 3000 data points using the same bubble sort on the same machine?

  Complete the remaining lines of code

A small Java Programming assignment and would like some help in reviewing

  What is one example from the list in table of popular

based on the keston 2013 article what are the advantages and disadvantages of using mashups? what is one example from

  Design a class that you can use to track the books

Define a class PileOfBooks that implements the interface described in question one. use a resizeable array oin your implementation. then write unit test woth adequate test cases for your implementation of class PiloOfBooks.

  Sorted list adt and the binary search tree adt

Explain the differences between our specifications of the Sorted List ADT and the Binary Search Tree ADT.

  Design and game loop with all the dummy functions

Design and game loop with all the dummy functions. During this module, implement one of the very first steps of Tetris, "Display the Bucket".

  How do declare array in various format

How do declare array in various format? Write a Java Program to display following output using Array List. What will be the output of the following code?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd