News Ticker

Menu

Browsing "Older Posts"

Extra Credit Assignment 1: Rock – Paper – Scissors Java Implementation

Saturday, 16 April 2016 /
Buy now

Problem:

Design and implement an application that plays the Rock-Paper-Scissors game against the computer. When played between two people, each person picks one of three options (usually shown by a hand gesture) at the same time, and a winner is determined. In the game, Rock beats Scissors, Scissors beats Paper, and Paper beats Rock. The program should randomly choose one of the three options (without revealing it) then prompt for the user’s selection. At that point, the program reveals both choices and indicates if the user won, the computer won, or if there was a tie. Continue playing until the user chooses to stop, and then show the number of user wins, losses, and ties.

Objective:


  1. Understand the concept of object-oriented programming.
  2. Understand the use of standard Java classes.
  3. Familiarize with code documentation, compilation, and execution.
  4. Expose to Java syntax, programming styles, and Java classes.

Code Screenshots:





Order Now:

Buy now

HTML, PHP URL registration and lising program Internet Programming Spring 2016 Assignment #5

/
Buy now

Introduction

Create and run a SQL script with a database named URL and a table named Urltable. The first field of the table should contain an actual URL, and the second, which is named Description, should contain a description of the URL.

Write a PHP script that obtains a URL and its description from a user and stores the information into a database using MySQL. After each new URL is submitted, print the contents of the database in a table.

Requirements:

Store the structure of the tables in a txt file for submission.

Output Screenshots:


Order now!

Buy now

Car Racing Java API Level 2.2 complete implementation with source code

/
Buy now

Major Coursework #2

In this coursework, you are required to implement an Android Game App, create an installable apk that can be installed on an Android phone (API level 2.2) and write a report that describes the design and justifies improvements.

The GameYou are required to develop Java code to implement an Android app inspired by the traditional top-down racing game. The code MUST extend the code base provided for the practical in week 7 of Spring term.

The OOP Design

You are required to develop an OOP design before starting implementation. This should be discussed and signed off in your practical session in week 8 of spring term. This will be marked in that week’s practical sign off sheet. You must include an electronic version (e.g. scan handwritten work) in an appendix of the submitted report.
You can later change the design. You must, however, justify your changes in the final report

Your game should:


  • Have functionality to start individual games on a screen using a separate welcome or start screen. The welcome screen must function using the Android library buttons.
  • Display the current score while playing. You define scoring mechanisms.
  • Have a Car that the user controls. 
    • Controlled by touches on the screen and/or sensors within the phone.
  • Have a Track
    • The player will lose a “life” or energy if the car drives off the track. (Try different retro racing games for inspiration.)
    • The track cannot be straight. I.e. it must have corners or change shape while the player drives through the track
  • Have Opponent cars or other vehicles
    • Must have more than one opponent on screen at some point in the gameplay. 
    • This can be opponents that the player is racing against (functioning as A.I. players), or slow driving cars that need to be overtaken, e.g. for extra points.
  • At least three game levels with different tracks and/or types of opponents with different behaviours.
  • Higher marks available for creation of new levels (e.g. levels stored online, in files or easy to reuse data structures within the game)
    • Marks are given for the complexity of the solution. 
      • Using online levels receives higher marks than storing them in a local file.
      • Using appropriate OOP design receives higher marks than one that does not.
  • Research and improve memory and speed efficiency of the game. This process, including tests to verify claims, must be described and justified in the report
  • There are 20% (capped) marks available for
  • Creating an online high score list. This must be hand coded, i.e. without using high score list libraries such as Google Play Services. You can, however, base the server-side code on the code provided in week 3 and 4 of spring term (worth max. 15%). Researching and improving multithreading of the game. This should be described and justified in the report (worth max. 15%)

Output Screenshot:


Order now and get you work in a minute :)


Buy now

Connect-K in Java Data Structures Compelete Source code

/
Buy now

Introduction:

In the game of Connect-K, red and blue pieces are dropped into an N-by-N table. The
the table stands up vertically so that pieces drop down to the bottom-most empty slots in their column. For example, consider the following two configurations:-

Legal Position -

.......
..................R
.....RB....
BRB...
RBBR.. -

Illegal Position -

............................Bad
 - ..BR......
R....
RBBR..

In these pictures, each '.' represents an empty slot, each 'R' represents a slot filled with a red piece, and each 'B' represents a slot filled with a blue piece. The left configuration is legal, but the right one is not. This is because one of the pieces in the third column (marked with the arrow) has not fallen down to the empty slot below it.
A player wins if they can place at least K pieces of their colour in a row, either horizontally,
vertically, or diagonally. The four possible orientations are shown below:

- Four in a row -

R RRRR R RR R RR R RR R R
In the "Legal Position" diagram at the beginning of the problem statement, both players had lined up two pieces in a row, but not three.
You have a tricky plan to ensure victory with Connect-K! When your opponent is not looking, you are going to rotate the board 90 degrees clockwise onto its side. Gravity will then cause the pieces to fall down into a new position as shown below:

- Start -

........................R......RB....BRB...RBBR.. - Rotate -
.......R......BB..... BRRR...RBB.................. - Gravity -
.....................R......BB.....BRR....RBBR... Unfortunately, you only have time to rotate once before your opponent will notice.All that remains is picking the right time to make your move. Given a board position, you should determine which player (or players!) will have K pieces in a row after you rotate the board clockwise and gravity takes effect in the new direction.
NotesYou can rotate the board only once.Assume that gravity only takes effect after the board has been rotated completely. Only check for winners after gravity has finished taking effect.

Input

The first line of the input gives the number of test cases, T. T test cases follow, each beginning with a line containing the integers N and K. The next N lines will each be exactly N characters long, showing the initial position of the board, using the same format as the diagrams above.
The initial position in each test case will be a legal position that can occur during a game of Connect-K. In particular, neither player will have already formed K pieces in a row.

Output

For each test case, output one line containing "Case #x: y", where x is the case number (starting from 1), and y is one of "Red", "Blue", "Neither", or "Both". Here, y indicates which player or players will have K pieces in a row after you rotate the board.

Limits

1 ≤ T ≤ 100.3 ≤ K ≤ N. Small dataset 3 ≤ N ≤ 7.Large dataset
3 ≤ N ≤ 50.

Example

You can search the Internet for another algorithm that has not been taught in class, and present, subject to the approval of the lecturer. Whatever the algorithm chose, the group will have to find (or implement) a Java implementation and show it, run it and discuss the code of such algorithm in a PowerPoint presentation in front of the class at the end of the course. Submission

Code Screenshots:



Order Now:

Buy now

Lock Up Tite user authentication program in Java GUI

Thursday, 14 April 2016 /
Buy now

Objective 

You work for a company called Lock Up Tite. They want you to write a front end program to grant authentication access to programs using a user name and password. Requirements Write a program that creates a loop and has three options for the user to select.

Option 1 allows the user to add a user name and password, which is then stored into a file.

Option 2 allows the user to enter a user name and password up to three times. For a given attempt, the user will be notified if the attempt is successful or unsuccessful.

Option 3 will exit the loop and end the program Main Menu Requirements: When the program starts, present the user with a menu offering the three options described above. After the user chooses either option 1 or 2, the program should go back to the main menu. The final option will end the program.

Option 1 Requirements:

This option prompts the user for their user name and password and stores them in a file named passwords.txt. The program should not overwrite what's already in the file; it should append the new user name and password to the end of the file.

Option 2 Requirements: 

This option uses the passwords.txt file to verify the user is entering a valid user name and password. It begins by asking the user for a user name and password within a loop that runs up to three times. If the password is correct, an appropriate message will be printed, the loop will end, and the program will go back to the main menu. If the user is unable to provide a user name and password that matches any of the combinations in the file, an appropriate message will be printed and the user will be allowed to try again. If the user fails after three attempts, the loop should end and the program should go back to the main menu.

Technical Requirements: 


1. Create a Java program named LockUpTite.java.

2. Create a procedure for each major task in the program. Call the procedures based on the option selected by the user.

3. After completing the tasks of Option 1 or 2, re-display the menu and allow the user to pick another option. Option 3 will exit the program.

4. Make sure your program is adequately commented, uses consistent naming conventions for variable and module names, and uses appropriate indentation and line spacing to enhance the readability of the code.

Instructions Follow these instructions as you build your program: 


1. Create the LockUpTite.java class and create a main() method.

2. In the main() method, create a try-catch block. Within the try block, get the path to theplayers.txt file. While you can do this many different ways, the easiest approach is to put all your files in the same folder and use Path filePath = Paths.get("players.txt"); If you use an IDE that keeps .java and .class files in a separate folder, then use the following approach: Path filePath = Paths.get("players.txt").toAbsolutePath();

3. You may want to declare this variable outside of the main() method but within the class so that the other functions you build can use it.

4. For the function that responds to Option 2, you should do the following:
(a) Ask the user for a username and password.
(b) Create a Boolean variable to indicate a successful login, and set it to false.
(c) Open the players.txt file by creating a BufferedReader object. Call theFiles.newBufferedReader() method and pass it the BufferedReader reader = Files.newBufferedReader(filePath); NOTE: If you are using Java 7, this technique will not work. Instead, you must send two arguments, aPath and a Charset. So if you are using
Java 7, you will need to do the following:

import java.nio.charset.Charset; Create your Path object as outlined above. Then when you create the BufferedReader: BufferedReader reader = Files.newBufferedReader(filePath, Charset.forName("UTF-8"));

1. Create a String named line, and assign it to reader.readLine(), where reader is the name of theBufferedReader object you created in step 4.

2. Create a while loop that will continue as long as line is not NULL and a match has not been found.
(a) Within the loop, use the line object’s split() method to break the String into two pieces, both of which should be stored in a String array.
(b) Check the name and password for a match. The user name taken from the file will be stored in the first element of the array; the password will be in the second. If both match, set Boolean to true.
(c) Assign line to the next line of text in the file by calling reader.readLine().

3. Below the while loop, check the Boolean variable. If it is true, then a match was found. If not, bump a counter to give the user a second chance unless the value of the counter has exceeded three increments.

4. Within the catch block, print out the Exception object’s error message.

Output Screenshots:








Order Now and get your work!


Buy now

C++ - Game of Dungeons and Dragons complete implementation with header files

Friday, 8 April 2016 /
Buy now

1.0 Overview

  In the popular role-playing, the game of Dungeons and Dragons players move from room to room in a dungeon where they encounter creatures, treasure, and various obstacles. The underlying functionality of such a computer game lies in the gaming engine. This Statement of Work presents the requirements for a "Scenario Mapping and Player Movement" class for a gaming engine.

2.0 Requirements

  The student shall define, develop, document, prototype, test, and modify as required the software system.

Moving shapes in JavaFX with Multi threading

Wednesday, 6 April 2016 /

Multithreading and JavaFX

Create an object-oriented JavaFX GUI that shows two shapes or images moving around a GUI. Each shape will have its thread to move it around the GUI. You must use threads – not AnimationTimelines or JavaFx Paths- this is a threading homework that happens to use JavaFx- not just a JavaFx homework.

You must have two separately distinct activities. Two flashing texts are only one different activity. I have provided an example of how to move an image in a circle and flashing text using threads. You may choose one of these, but your second activity must be different from shooting and moving in a circle. Do not directly copy the examples- you may use the algorithm with other things. Try moving in an up-down, side to side, zig-zag, etc. Be sure to shut down all threads when the Application closes. (Hint: interrupt() method on Thread class)

Your program should consist of multiple classes. Put thread Runnable classes in a different class from Application and pass shared information in the constructor.

Order Now:


Buy now