# Need Help to Solve The 2 Question...

• June 1st, 2012, 02:18 AM
pineman
Need Help to Solve The 2 Question...
Hi everyone.. I very new in Java and with 0 knowledge.. Please help me to solve this question..
QUESTION 1

You are required to write an application called Customer Billing System. This system will calculate water usage charges for a month that has been imposed by Syarikat Air Selangor Berhad. This system will categorise users into residential users and industrial users and calculate the charges based on data entered by the user. Data needed are the type of customer (Residential or Industrial), past meter reading and current meter reading.

Given the charge rate as follows:

For Residential:
0 – 15 m3 : RM 0.82 every m3
15.1 – 40 m3 : RM 0.65 every m3
40.1 m3 and above : RM 0.42 every m3
Minimum charge is RM 5.00

For Industrial:
0 m3 and above : RM 1.47 every m3
Minimum charge is RM15.00

Instruction:
The above application must be able to hold information for up to 5 customers. Use an array and repetition structure to store information about users such as type of customer, past meter reading, current meter reading and charges. Write a structured Java program to develop the above system by following the steps below:

a) Prompt the user to input the type of customer, past meter reading and current meter reading. Next, get the difference between current meter reading and past meter reading.
b) Separate them as either R/r for Residential or I/i for Industrial. You can use any one of the two selection structures.
c) Calculate the charges based on rates given above. If there is no water consumption, the minimum charge will be imposed. You can use any one of the two selection structures.
d) Display information about the type of customer, past meter reading, current meter reading and charges for each customer. Print the information in table format.

QUESTION 2

Create a class named Student (class definition program). The class contains:

• Private attributes to store values of Student name, Student university and Student mark.
• A method named initialize() to assign initial value to the Student name, Student University and Student mark as specified in the parameter.
• A method named reverse() to display Student name in reverse order.
• A method named determineKKHS() to determine if a student comes from Hulu Selangor Community College or not. This method will return true if the value in the object is equal to the specified value.
• A method named determineGrade() to determine grade based on Student mark. This method will return grade of a student.
• A method named toString() that returns a string description for the student.

Given the grades according to marks:

90 and above A
70 – 89 B
50 – 69 C
0 – 49 D

Create the class program that has main() method for execution. This program should create two Student objects and implement all methods listed in the Student class.

Use your own creativity to implement all methods in Student class and design your interface interactively.
• June 1st, 2012, 02:19 AM
pineman
Re: Need Help to Solve The 2 Question...
So fuzzy and dont have any idea...
• June 1st, 2012, 03:13 AM
pbrockway2
Re: Need Help to Solve The 2 Question...
Double posted at http://www.javaprogrammingforums.com...-question.html

Quote:

You are required to write an application ... Use your own creativity to implement all methods in Student class
Sorry, but the whole idea of the assignment is for you to write some code.

No-one here expects your code to be perfect - or even compile! - but we have to have something to work with.
• June 1st, 2012, 03:20 AM
pineman
Re: Need Help to Solve The 2 Question...
GIVE me some code pbrockway2... Give give me sample that i can get started or edit.. please help me tq
• June 1st, 2012, 09:43 AM
copeg
Re: Need Help to Solve The 2 Question...
Quote:

Originally Posted by pineman
GIVE me some code pbrockway2... Give give me sample that i can get started or edit.. please help me tq

That's not how this works. We are neither a code repository, nor a place where you can beg people to help you cheat. If I am wrong with this statement, than please show us...if you want help, then as pbrockway2 mentioned you will have to show some effort. Expecting us to give our valuable time to someone that hasn't shown they've invested any of theirs is pretty rude request. I am locking this thread, as it seems to be a homework dump expecting someone to bite and do it for you.

I encourage you to make an effort....and if you wish to make use of these forums then by all means post again - only after reading the 'getting help' link in my signature. I am locking this thread.