c) Streamyx subclass has a method named calcBill() which returns the amount the customer
has to pay monthly. The amount is calculated based on the package type chose by customers
during their installation and how long they use the service (as shown in the table below).
Package Type Usage
Time(minutes)
Amount Billed(RM)
Broadband Unlimited access 68
Normal
<= 480 0.30 per minute
480 0.15 per minute
Business <= 240 0.50 per minute
> 240 0.30 per minute
Write the method calcBill() for the Streamyx subclass.
(8 marks)
d) Telephone subclass has a method named calcBill() which returns the amount the customer
has to pay monthly. The amount is calculated based on monthly fee (RM30.00) plus the minute
used by customers as below:
A three minutes telephone call costs RM1.15. Each additional minute costs 26
cents.
e) Write an application to display all the details of object Telephone and streamyx.
f) Change the class TMPoint to abstract class and add calcBill as an abstract method.
Given the following classes and inheritance hierarchy which are used to store various types of
communication services provided by TMPOINT previously known as Telekom Malaysia :
and the following definition for the TMPoint class :
public class TMPoint
{ String phoneNo;
String custName;
String dateinstall;
double installFee;
//constructor
//accessor methods
}
Streamyx class is inherited from class TMPoint. Its new attribute is package type and usage time.
Telephone class is also inherited from class TMPoint. Its new attribute is minuteUsed.
a) Define the constructor for superclass TMPoint and its subclass Streamyx and Telephone.
(8 marks)
b) Write the accessor and setter methods for each attribute from the superclass and subclasses.
(4 marks)
Look at this program.
city = 'London'
state = 'UK'
print('{0} is a city in {1}' .format(city, state))What will it output? Type the output.
How can I Write a Java programming
1.ask the use input the username
2.input the name in next line
and it can be content the student class
System.out.println(|Student Name : |)
use “ SList [i] getStudentname “
and display after the Student Name : Ada Sze
hins:
use for loop
do
while
else
Write a C++ program to answer inquiries about data of 5 students. The program will display a menu
that enables the users to choose from three options
Create a flowchart for a website login form. The website prompts for a username and password. Display "incorrect username and/or password" then go back to the login form if the user credentials are incorrect. Otherwise, display "welcome to <Nameofyourwebsite> and terminate the program
write a program to print sum of the numbers divisible by the given number T from M to N in python
Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.
Think you can handle the job?
Instructions:
make a program that will accept an integer and then print out its factorial using loops
given list of students records.Write a program with signature as below:
Method Name: getStudentsWithMarksmoreThan()
Input : Marks - integer
output: List of students having marks more than input.