Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ program Q2 o =you are .. nd apply ur Create a class Android whose objects have unique data. The class has the following attributest
c++ program
Q2 o =you are .. nd apply ur Create a class Android whose objects have unique data. The class has the following attributest taga static integer that begins at 1 and changes each time an instance is created name a string that is unique for each instance of this class Android has the following methods: Android-a default constructor that sets the name to "Bob" concatenated with the value of tag. After setting the name, this constructor changes the value of tag by calling the private method change Tag getName-returns the name portion of the invoking object. isPrime(n)-a private static method that returns true if n is primethat is, if it is not divisible by any number from 2 to n-1. changeTag-a private static method that replaces tag with the next prime number larger than the current value of tagStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started