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
if we try to use tail-recursive rules to implement non-tail-recursive rules, it will normally result in rules that are
Agata [3.3K]

It will normally result in rules that are more complex and more difficult to understand option (C) is correct.

<h3>What is tail recursion?</h3>

The recursive function is essentially used as the function's final statement in the tail recursion.

If we try to use tail-recursive rules to implement non-tail-recursive rules, it will normally result in rules that are

A. simpler and easier to understand.

B. circular rules.

C. more complex and more difficult to understand.

D. more time-consuming in execution.

The recursive function is essentially used as the function's final statement in the tail recursion. Therefore, tail recursion is what happens when nothing remains to be done after returning from the recursive function.

Thus, if we try to use tail-recursive rules to implement non-tail-recursive rules, it will normally result in rules that are more complex and more difficult to understand option (C) is correct.

Learn more about the tail recursion here

brainly.com/question/20749341

#SPJ4

4 0
1 year ago
When using color in computer-generated presentation aids, you should use?
REY [17]
When using color in computer-generated presentation, you should use the same background color on all visuals and no more than two colors for words. This is a p<span>rinciples of </span>color and must be applied in computer-generated presentation aids like models,g<span>raphics( visual representations of information) and pictures (photographs and illustrations).</span>
7 0
3 years ago
What is a computer briage coures​
Stella [2.4K]

what's your choices for this question

4 0
3 years ago
I was just called a man in a wig ugh <br><br> Any tips for doxxing someone?
kondaur [170]

Answer:

Explanation:

hope this help

6 0
2 years ago
What type of purchase requisition is used to turn-in a recoverable/reparable material to the ssa?
m_a_m_a [10]

ZRX is the purchase requisition document type used to turn a recoverable repairable material for Remote customers to the SSA.

What is a purchase requisition?

Employees can start a purchase by sending internal documents called buy requisitions. A buy order is issued to a supplier to place the order for the goods/services in question once the purchase has received the relevant person or department's approval.

What is the purpose of a purchase requisition?

A purchase request form is a formal internal document that is utilized during the purchasing process. Employees utilize this to communicate the resources they require to department supervisors. Therefore, an employee will submit a formal request via a requisition form to the purchasing department if they have a requirement.

Learn more about purchase requisition: brainly.com/question/16413109

#SPJ4

5 0
2 years ago
Other questions:
  • WHOEVER HELPS ASAP GETS BRAINLiEST!!!!!!!!! :)
    15·2 answers
  • 2. You have classes to represent different shapes (see below). You realize you can benefit from inheritance and polymorphism by
    13·1 answer
  • Select the correct answer.
    6·1 answer
  • Who invented the speaker?
    14·2 answers
  • HELP PLS!!! In a presentation, what is layout?
    10·2 answers
  • Write if true or false
    12·1 answer
  • What does advance mean​
    6·1 answer
  • Which of the following is not the disadvantage of closed
    7·2 answers
  • 2. Which one of the following is the purpose of relating tables in a database?
    8·1 answer
  • What is the accurate description
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!