Course Hero Logo

Output subscriber name magsarrayxgetsubscribername

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 11 - 15 out of 15 pages.

output “Subscriber Name: ”,magsArray[x].getSubscriberName()output “Magazine Name: ”, magsArray[x].getMagazineName()
We have textbook solutions for you!
/Java-Programming-9th-Edition-9781337397070-773/
The document you are viewing contains questions related to this textbook.
Chapter 1 / Exercise 5
Java Programming
Farrell
Expert Verified
Programming Logic and Design, 7eSolutions 10-12output “Months Remaining: ”,magsArray[x].getMonthsRemaining()x = x + 1endwhilex = 0while x > MAXmagsArray[x].setMonthsRemaining(magsArray[x].getMonthsRemaining()-1)x = x + 1endwhilex = 0while x > MAXoutput “The information entered forMagazineSubscription ”, x+1,“ after one was subtracts from months”output “Subscriber Name: ”,magsArray[x].getSubscriberName()output “Magazine Name: ”, magsArray[x].getMagazineName()output “Months Remaining: ”,magsArray[x].getMonthsRemaining()x = x + 1endwhilestopFind the Bugs9.Your downloadable student files for Chapter 10 include DEBUG10-01.txt,DEBUG10-02.txt, and DEBUG10-03.txt. Each file starts with some comments thatdescribe the problem. Comments are lines that begin with two slashes (//). Followingthe comments, each file contains pseudocode that has one or more bugs you must findand correct.
10. a. Playing cards are used in many computer games, including versions of suchclassics as Solitaire, Hearts, and Poker. Design a Card class that contains a string datafield to hold a suit (spades, hearts, diamonds, or clubs) and a numeric data field for avalue from 1 to 13. Include get and set methods for each field. Write an applicationthat randomly selects two playing cards and displays their values.
Programming Logic and Design, 7eSolutions 10-13
b. Using two Card objects, design an application that plays a simple version of thecard game War. Deal two Cards—one for the computer and one for the player.Determine the higher card, then display a message indicating whether the cards areequal, the computer won, or the player won. (Playing cards are considered equalwhen they have the same value, no matter what their suit is.) For this game, assume
Programming Logic and Design, 7e

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 15 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
Subroutine, Return statement, Void type, National identification number
We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
Java Programming
The document you are viewing contains questions related to this textbook.
Chapter 1 / Exercise 5
Java Programming
Farrell
Expert Verified

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture