Differentiate between source code, source file and byte code; demonstrate this using a suitable example.
List the three categories of variables; hence show how a variable is declared in Java using a suitable example
Using three steps describe how to create an array of data items; hence show this using an example of your choice.
List four items you need to declare a method of Java.
Differentiate between the “is – a” and “has – a” relationship in Java, giving a suitable example of each.
What does the term loose coupling mean in object oriented programming? Hence list three advantages of loose coupling.
List two ways of handling exceptions
Differentiate between method overriding and method overloading (2 marks)
Answer any two questions from this section
Seafaring Ltd is running a promotion for all their customers. When a customer makes a purchase for electric goods the system awards the customer 10% of the purchase value as points. In reality, however, the customer is awarded 40% in points of the profit on that particular sale. Non-electric goods are not awarded any points. At the end of the promotion period customers who have accumulated over 1000 points will all be awarded random rewards. The management are concerned that this little trick they are using will be discovered when a customer called Mutua who is IT savvy comes calling. Write a program that will allow Mutua to enter all his sales for the month show him his points as 10% of purchase price but still award him points based on the 40% rule. i.e. what it displays and what it stores are different values.
For a custom-written paper on the above topic, place your order now!
What We Offer
• On-time delivery guarantee
• PhD-level professionals
• Automatic plagiarism check
• 100% money-back guarantee
• 100% Privacy and Confidentiality
• High Quality custom-written papers