Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Using java, Build GUI along with Jframes for university course management system

JAVA FX BASED POKER TASK



See apps.game.Cards for starter code representing a deck of playing cards.


5 Card Draw Poker has many rules, but to make it simple to implement we will only use some of these rules. Any student who wants to implement more is welcome, but remember that the following rules must be implemented.


Game is played with one dealer and one player. The computer will act as the dealer.


You can use any image to show cards.


All bets are to be made BEFORE each hand is dealt and once the first card is dealt bets cannot be removed. If you do not place a bet the dealer will not deal you any cards. In this case Dealer should win the game.


Values for the Cards


The player is given two cards, both face up.


The dealer gets two card, one face up and one face down.


The suits are ignored, they don't count in the game at all.


The cards with two to nine showing are taken at face value

Blackjack has many rules, but to make it simple to implement we will only use some of these rules. Any student who wants to implement more is welcome, but remember that the following rules must be implemented.

  • Blackjack is played with one dealer and one player. The computer will act as the dealer.
  • You can use any image to show cards.
  • All bets are to be made BEFORE each hand is dealt and once the first card is dealt bets cannot be removed. If you do not place a bet the dealer will not deal you any cards. In this case Dealer should win the game.

Values for the Cards

  • The player is given two cards, both face up.
  • The dealer gets two card, one face up and one face down.
  • The value of the hand is the sum of the cards.
  • If the player is dealt a "ten" and Ace as his/her two dealt cards, he/she has twenty one and is the winner.
  • The suits are ignored, they don't count in the game at all.
  • The cards with two to nine showing are taken at face value.

do while loop



2. Write a java program that reads in a list of int values one per line



and outputs their sum as well as the numbers read with each number.



Your programs will ask the user how many integers there will be, and



fill the table with the integers input.



Sample output:



How many numbers will you enter?



2



Enter 2 integers one per line:



20



30



The sum is 50

do while loop



Sample output:



1. Write a program that asks the user for a starting value and an ending



value and then writes all the integers (inclusive) between those two values.



Enter Start:



10



Enter End:



15



10



11



12



13



14



15



Sum of in range values: 75

MOVE ZOMBIE UP DOWN LEFT RIGHT CONTINUOSLY WITH ONE CLICK

public class j extends java.applet.Applet implements Runnable {

  Image z[] = new Image [2];

  Image crImg;

  Thread r;

  int x;

  int y;

  public void init() {

  String zSrc[] = {"z1.png", "z2.png",};

  for (int i = 0; i < zombies.length; i++) {

      z[i] = getImage(getCodeBase(), "images/" + zSrc[i]); }}

   public void start() {

    if (r == null) {

      r = new Thread(this);

      r.start();}}

 public void stop() {

    if (r != null) {

      r.stop();

      r = null;}

 void pause (int time) {

    try { Thread.sleep(time); }

    catch (InterruptedException e) { }

  }   

public void run() {

walk (0, size().width); }

void walk (int start, int end) {

for (int i = start; i < end; i += 1) {

 x = i;

 if (crImg == zombies[0])

 crImg = zombies[1];

 else crImg = zombies[0];

repaint();

pause(150);}}

public void paint(Graphics g) {

if (crImg != null)

 g.drawImage(crImg, x, y, width, height, this);

}


for loop



sample output




c. Number Square Cube



1 1 1



2 4 8



3 9 27



4 16 64



5 25 125



.



.



.



10 100 1000




for loop



sample output



b. 1 5 2 10 3 15 4 20 5 25

for loop sample output a. 19 17 15 13 11 9 7 5 3 1


Create a Java program that will utilize conditional statements to check if a student wishes to join and is qualified to join the limited Face-to-Face classes. There are four (4) requirements in order to join:



SAMPLE OUTPUT 1:

Would you be joining the LF2F classes?  Yes

Are you fully vaccinated?  Yes

Do you have health insurance that covers COVID cases?  Yes

Did your parents allow you to join LF2F classes?  Yes

Are you registered with Stay Safe PH?  Yes

That's great! You can join the limited Face-to-Face classes!

 

SAMPLE OUTPUT 2:

Would you be joining the LF2F classes?  Yes

Are you fully vaccinated?  Yes

Do you have health insurance that covers COVID cases?  No

Did your parents allow you to join LF2F classes?  No

Are you registered with Stay Safe PH?  Yes

We are sorry to inform you that you are not allowed to join the limited Face-to-Face classes.

 

SAMPLE OUTPUT 3:

Would you be joining the LF2F classes?  No

You may answer your laboratory activities at home.

LATEST TUTORIALS
APPROVED BY CLIENTS