CCS108 Week 8 Laboratory Exercise New and Revised
CCS108 Week 8 Laboratory Exercise New and Revised
Laboratory Exercise
Member 1 Almocera, Francess B. Score:
Names (LN,
FN MI.): 2 Ablaña, Elaiza P.
RUBRIC:
TRAITS GRADING SCALE WEIGHT
EFFICIENCY The code is huge The code is brute The code is fairly The code is 30
and force and efficient without extremely efficient
appears to be unnecessarily long. sacrificing without sacrificing
patched readability and readability and
together. understanding. understanding.
CORRECTNESS The program The program works The program works The program 30
does not run. but may encounter but have minor works and meets
run-time errors or issues in some all of the
incorrect output in specifications. specifications.
some scenarios.
INSTRUCTION:
A basic phone is a device which allows a user to communicate though calls and text. A sim card with a unique
number with sufficient load balance is required for a smartphone to do these things.
Your task is to create a class named "BasicPhone" that will allow a user to assign the manufacturer, model and a sim
card number and will print the details on user's screen upon object creation. Remember that a sim card number can
be changed anytime the user decides to change it. Assume that zero load balance will be the default load balance after
creating a BasicPhone object or even changing the sim card number. Always print the details of the BasicPhone object
whenever there is a change in the sim card number.
To perform the given operations of the BasicPhone object, the user must have a way to buy load (in peso) to be
used for texting (1 peso per text per 100 characters) and calling (5 pesos per minute or less).
In every operation performed, the load balance should always be monitored and be displayed in user's screen after
each operation.
Texting requires the sim card number of the receiver and the message itself as basis for computing the amount of
text in peso to be deducted from the load balance. You just need to print the receiver's number, the message content,
and the computed amount based on the number of characters in the message after performing the operation for
texting.
Calling requires the sim card number of the receiver and the number of seconds of the call as basis for computing
the amount of call (in peso)to be deducted from the load balance. You just need to print "You called (insert receiver's
sim card number) for (amount in minutes and seconds)" whenever the user performs calling operation.
As additional requirement, the program should be menu driven for performing the given operations and will not stop
unless the user selects the EXIT as choice in a separate class named "Main". Only a single BasicPhone object will be
created for every program execution. Include validation messages for invalid transaction such as trying to text or call
having an insufficient balance. Include a feature for checking the existing load balance whenever the user decides to
check. Encapsulation will be a major factor in this activity that is why it is advised to carefully analyze the class fields
and methods to be used. Lastly, a CLASS DIAGRAM is required that will contain the needed program requirements.
• the link to the video tutorial on how to use the UMLet application is https://youtu.be/3UHZedDtr28
PROGRAM CODE
File: BasicPhone.java
File: Main.java
SAMPLE OUTPUT
REMINDERS:
• Only the GROUP LEADER should submit and click the MARK AS DONE Button • CHEATING AND
COPYING another group’s answer will mean a GRADE OF ZERO • Only students who are PRESENT
should be included as members of the group upon submission or else, the entire group will receive a
GRADE OF ZERO
• DEFAULT GRADE will be given only to those who are PRESENT and will not be able to submit on
time
• GROUPS WITH SUBMISSION will be subject for strict assessment using the attached RUBRIC •
LATE submissions will not be accepted
• FAILURE to follow the instructions will be subject to POINTS DEDUCTION