Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java fast plz Given the following UML Class Diagram Club Card #card_num : String # name : String #age: int #year: int + Club_Card (all

image text in transcribed

image text in transcribed

Java fast plz

Given the following UML Class Diagram Club Card #card_num : String # name : String #age: int #year: int + Club_Card (all parameters) + Setters & Getters + toString(): String + equals(x: Object): boolean Yearly_card - Cost: double - type : int // (1) for old cards or (2) for a new card + Yearly_card (all parameters) + Setters & Getters + toString(): String + compute Price : double Permanent_Card -charge: double -Kind: String //Personal or family card + Permanent_Card (all parameters) + Setters & Getters + toString(): String + computePrice : double Part II: Driver Class (50 points) Write a test/driver program to: 1. [10 pts] Create an array of 10 Club_Card objects. 2. [10 pts) Fill the array with the information about either Yearly_card or Permanent_Card objects. You have the choice to either read the data from the user using a Scanner object, or construct an array of Strings from which you fill the information into the array of Club_Cards in a loop. 3. (15 pts] Print all Yearly_card that have an issue year less than 2015. 4. [15 pts] Count the number of Permanent_Card that are that are issued for families. 2 Page

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions