1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Klio2033 [76]
3 years ago
5

A) Write a class Card. A Card has the following private attributes:

Computers and Technology
1 answer:
Over [174]3 years ago
6 0

Answer:

Java.

Explanation:

public class Card

{

   String Suit;

   int value;

   public Card(int value, String Suit) {

       self.value = value;

       // Check Suits value

       if ((Suit == "hearts") || (Suit == "spades") || (Suit == "clubs") || (Suit == "diamonds"))

           self.Suit = Suit;

       else {

           Suit = "none";

           throw new IllegalArgumentException("no card of this type exists.");  

        }

   }

   public String getSuit() {

       return Suit;

   }

   public int getValue() {

       return value;

   }

 

   public void print() {

       System.out.println("%d of %s", value, Suit);

   }

}

public class Deck {

}

You might be interested in
What is the difference between a try block and a try statement? Group of answer choices There is no difference; the terms can be
telo118 [61]

Answer:

Coding is a skill where you take instructions (the steps in a task) and translate it into a language the computer understands since computers do not language.

Explanation:

Coding is a skill where you take instructions (the steps in a task) and translate it into a language the computer understands since computers do not communicate like humans. They communicate in a language called BINARY and it is uses 0's and 1's. Coders write the instructions using a programming language.

8 0
3 years ago
Sometimes we write similar letters to different people. For example, you might write to your parents to tell them about your cla
OleMash [197]

?

?????????????????????

4 0
3 years ago
The proper hand position for keyboarding.
mr_godi [17]

Left fingers on ASDF whilst right hand is on jkl;

A= pinkie

S= ring finger

D=Middle

F=Index.

J=Index.

K=Middle

K=Ring finger

;= pinkie

Hope this helped

5 0
3 years ago
Consider the following code segment:
horrorfan [7]

Answer:

13333333333333333333333fv mvfdmv mfv fmv f mf vmf f vfmvnfmvnmnvmfnvmnvmnv3Explanation:

6 0
3 years ago
When you add a zero to the right of a decimal number, it multiplies its value by 10 (For example, "15" becomes "150"). What simi
My name is Ann [436]

Answer:

When you put a 0 on the right side of a binary number it multiplies it by 2

Explanation:

6 0
3 years ago
Other questions:
  • Text filters allow you to create a custom filter to match ________ the text in a field that you specify.
    7·1 answer
  • Which one of the following words is NOT an action verb?
    10·2 answers
  • Explain the importance of determinism in an industrial LAN
    8·1 answer
  • Consider the following process for generating binaries. A compiler is used to generate the object code for individual modules, a
    8·1 answer
  • Help pls. Computer basics.
    5·2 answers
  • This is used to copy information from cell to cell in the spread sheet
    7·1 answer
  • A) Write "T" for true statement and "F" for false statement.
    9·1 answer
  • Can anyone help explain this?
    13·2 answers
  • Using the arrow key you can adjust the position of a selection in increments of
    7·1 answer
  • Suppose that you are given the following partial data segment. what value does idtype contain, in decimal?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!