Question: Assignment 1 Part 1 Consider a Class named App with the following private data members: name: to represent the app's name. The default value is

Assignment 1
Part 1
Consider a Class named App with the following private data members:
name: to represent the app's name. The default value is "NewApp".
rate: to represent the app's rate, in a range from 0.0 to 5.0. The default value is 0.0.
downloads: to represent the app's number of downloads, as a positive number. The default value is 5.
In addition, the class has the following methods:
A default constructor to initialize the data members.
A set method named setApp to set all app information. Please provide an error message for invalid values.
A get method for each data member.
A method named isTopApp that returns true if the app has a rate of 5.0 and more than 100 downloads. Otherwise the method should return false.
Part 2
Create a program that tests the class App described in the previous question, as follow:
Create an array of type App named Apps of size 5.
Ask the user to enter name, rate and download for the 5 Apps.
Find and print the name of the App which isTopApp
Computer science question
 Assignment 1 Part 1 Consider a Class named App with the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!