Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a javacode please Part A) Define a Class named App with the following private data members: name: to represent the app's name. The default

write a javacode please
image text in transcribed
Part A) Define 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 is TopApp that returns true if the app has a rate of 5.0 and more than 100 downloads. Otherwise the method should return false. Part B) Write a program that do the following: 1. Create object of App named A1 with name: Google map, rate: 5, downloads: 600 2. Create object of App named A2 with name: Talabat, rate: 4, downloads 300. 3. Create object of App named A3 and ask the user to read suitable data for it. 4. Print the names of apps that is considered Top Apps

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions