Question: SmartPhone data _ mega _ byte / / integer minutes / / type: double datacost / / accept double numbers voicecost / / accept double

SmartPhone
data_mega_byte//integer minutes //type: double datacost// accept double numbers voicecost// accept double numbers
All constructors
setters an getters as needed
...//add more methods if needed
toString 0
getBillo:double
\table[[Device],[model name//string],[IMEI //type: string (number on any device)],[price// accept double numbers],[manufactureDate: String (dd/mm'yyyy)],[1. All constructors],[2. setters an getters as needed],[3. toString()],[4. getBing]]
MobilePhone
sms_no//string
package_no// string
price_package// accept double numbers
smscost// accept float numbers
All constructors
setters an getters as needed //add more methods if needed
tostringo
getBillo:double
Part A
Specify the relationship between classes.
Implement the different constructors for each class.
c. The IMEI includes a mixture of letters and digits, with all letters capitalized.
When reading the IMEI from the user, you must check whether it meets the above requirements before accepting/setting the value. Otherwise, you have to throw an exception (new MyException("The entered IMEI is not valid")), where MyException is a custom evception you have to develop yourself.
Examples of invalid IMEI: ABX900, ABX900CBz, ABXFGJJKA, 900ABCABC. These IMEIs are not accepted because they may have a length of fewer than 9 digits, they don't start with three characters, or they contain lowercase letters.
Examples of a valid IMEI: ABX900CBZ
In the SmartPhone class, add the following methods:
getBill () This method is responsible for returning the value of the bill using the following formula: data_mega_bytevoiceCost;
In the mobilePhone class, add the following methods:
getBill This method is responsible for returning the value of the bill using the following formula: sms_no*smscost+price_package;
Part C
Write a driver class called Driver_YourStudentiD, for example, Driver_1221089. This driver should test all methods. The driver must read data from a text file with the extension '. txt'.
 SmartPhone data_mega_byte//integer minutes //type: double datacost// accept double numbers voicecost// accept

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!