Question: CLR 2: Write Java program code to solve a problem, based on a description of the problem context, including UML diagrams, using object-oriented techniques. CLR

CLR 2: Write Java program code to solve a problem, based on a description of the problem context, including UML diagrams, using object-oriented techniques. CLR 11: Identify appropriate strategies for solving a problem. Objective of this Assignment: Ensure students: 1. Learn how object, class and method works in Java programming. 2. Implement Method overloading concepts; and 3. Understand the static concepts in Java with example. Pre-Assignment Instructions: To complete this assignment successfully read the module content and follow the given links to solve the theory and programming questions and items in the interface. Assignment Tasks: Task 1: a. Create a class named 'Student' with String variable 'name' and integer variable 'roll_no'. Assign the value of roll_no as '2' and that of name as "John" by creating an object of the class Student. b. \Assign and print the roll number, phone number and address of two students having names "Sam" and "John" respectively by creating two objects of class 'Student'. Task 2: Write a program to print the area of a rectangle by creating a class named 'Area' having two methods. First method named as 'setDim' takes length and breadth of rectangle as parameters Second method named as 'getArea' returns the area of the rectangle. Length and breadth of rectangle are entered through keyboard

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!