Computer Programming I (COSE101)
Project 1. KU Mobile Phone Bill Calculator 2019 Spring Semester
Prof. Sungdeok Cha, Junbeom Hur
TA. JinHee Lee, Hyundo Yoon, Hodong Kim
Environment
• OS: Windows 10
• IDE: Visual Studio 2017
• Language: C (‘C’ only. If use any of ‘C++’, will get 0 point.)
Computer Programming Project 1
Program your own ‘KU Mobile Phone Bill Calculator’.
KU Mobile Phone Bill Calculator
• Your program should display the main menu providing following functions.
1 Display plans
2 Usage information for past two months 3 Input this month usage
4 Total fee for past 3 months
5 Best plan recommendation
6 Exit
• A user can execute each function by entering corresponding number as input.
• Each option must provide ‘back to main menu’ functionality as default.
Example of main menu
1 Displaying Plans
• Your program will displays two pre-defined plans. The two pre-defined plans are as follows.
Basic Plan
More Data Plan
Included in plan
Additional usages
Included in plan
Additional usages
Voice
500 min free calls
₩50 / 1 min
300 min free calls
₩10 / 1 min
Text
100 free text messages
₩10 / 1 text message
100 free text messages
₩30 / 1 text message
Data
2.00 GB free data
₩1000 / 0.1 GB
30.00 GB free data
₩500 / 0.1 GB
Basic fee
₩ 20000
₩ 45000
1 Displaying Plans
• You have to display pre-defined mobile billing plans
2 Past2months’usageinformation
• For the past two months, your program must display the following information for each month
• User’s plan
• Usage of voice
• Usage of text
• Usage of data
• Current plan, and usages are determined randomly with following conditions when your program begins.
1) Current plan: one of pre-defined plans
2) Usages of voice: from 1 to 700 min
3) Usages of text: from 0 to 300 messages
4) Usages of data: from 0.50 to 150.00 GB
3 Input this month Usage
• Input your usage of voice, text, and data for current month 1) Usages of voice
2) Usages of text messages 3) Usages of data
4 Fee of Past 3 Months
• Your program must show billings for the past three months
• Billings include the following information
• Usage of voice, text, data for each month
• Extra data that will be carried over to next month
• If you consume data below free tier in a month, the unconsumed data can be carried over to the next month
• But, the amount carried over cannot exceed 10% of the total amount of free tier in a month
• Ex) Free tier = 30GB, used = 25GB, Carried over = 3GB • Fee of each month
5 Bestplanrecommendation
• Your program must recommend the best plan based on user’s average usages of the past three months.
1) 2)
3)
The best plan is the one providing service with the lowest total fee.
The best plan is determined based on the average usages for the past three months (including this month).
During the average usage calculations, round off to each unit of service.
Ex) 1st month: 350 min, 2nd month: 424 min,
3rd month: 200 min, Average usages: 324 min,
100 texts, 3.25 GB 200 texts, 2.15 GB 50 texts, 10.00 GB 116 texts, 5.13 GB
5 Bestplanrecommendation(cont.)
Note
• When you want to clean CMD, you can use system(“cls“);.
•
Submission Format
• Submit a file ‘Student ID_prj1.zip’
• Source file of your program ‘Student ID_prj1.c’
• Several screenshots of your program ‘screenshot #.png’
• BlackBoard (kulms.korea.ac.kr)
Submission Due Date
• Due date: 2019/05/01 (1st, May), 23:59
• Please submit earlier than dead line. Late submission will not be
accepted with any reason.
ex) Errors on the blackboard
• Plagiarism (or cheating): 0 point with no exception.
• Sharing source code with friends in person
• Post up a solution on the personal blog or SNS in public
• Or, any kind of academic dishonesty will be seriously penalized