CSC238 Object Oriented Programming Assignment Sample UITM Malaysia
This course will introduce students to Object-Oriented Programming. The main concepts of this paradigm are discussed and applied, including how classes can be used as building blocks for design patterns in programming languages.
Students use a programming language that supports the object oriented approach by solving more complex problems than those solved in Fundamental Computer Problem Solving Course with objects and abstraction techniques like encapsulation, inheritance, polymorphism along with applying these principles effectively using text files.
Buy CSC238 Individual Assignments Online From Malaysian Helpers
Assignment Brief Of CSC238 Object-Oriented Programming UITM Malaysia
Assignment Activity 1: Differentiate between Structured and Object-Oriented Programming approaches.
Structured programming is a design method developed for teaching programming languages and computer science. Structured programming aims to reduce the number of defects, or mistakes in coding by limiting the number of ways that programmers can solve problems.
Objects-oriented programming extends structured techniques by allowing data as well as procedures to be treated in the same way. It leads to more powerfully modularized programs and eliminates much of unnecessary code from traditional methods.
Object-oriented programs are often written following three main ideas: data abstraction, inheritance, and polymorphism. Concepts within the object-oriented approach include encapsulation (which is total or partial isolation of information), abstraction (which refers to defining features not implementation), modularization (the process of dividing software into smaller parts ).
Assignment activity 2: Explain the main characteristics of Object-Oriented Programming – abstraction, encapsulation, inheritance and polymorphism.
Object-oriented programming (OOP) provides a handy metaphorical model for representing in software the knowledge people often develop about actions and processes.
There are many characteristics of Object Oriented Programming, but for now we’ll focus on four important ones:
1.Abstraction – is the process by which an object’s operations are simplified to make them well-suited to their context within an application domain. This simplification may sacrifice some degree of generality and power, but allows us to devise methods that perform these simple tasks with high reliability all without introducing too much complexity into our system.
An example of abstraction would be writing code that slices a pizza–the code does not care what type of pizza it is slicing; it only is given information on the size of a pizza and the number of slices to be cut, so the code just knows to slice something.
2.Encapsulation – is a mechanism for keeping both data and functions that operate on those data together as one unit. One can think about encapsulation like this: “Wrapping an object with all its properties into a neat package”.
In other words, encapsulated objects are opaque; we cannot know what’s inside until we access them. Encapsulation prevents outside interference with an object while also hiding its implementation details from users of the class.
3.Inheritance-is a way to make new classes based on existing ones through specialization or generalization . Inheritance is a way to reuse code and create a hierarchy of classes that reflect the structure of your application.
4.Polymorphism-is the ability to compose objects into sequences in which types are inferred rather than being specified. This can be useful when we want to add functionality to existing types without having to modify those types themselves, or where some degree of flexibility allows us build instances with different characteristics at runtime.
Download CSC238 Group Assignments at Cheap
Assignment Activity 3: Apply programming basics and concept of classes to solve problems.
OOPs are one way to solve problems. Here’s an example of a really simple OOP problem:
1.Create a class called “robots” that includes the following functions or methods within it (mimic how classes work in real life):
robot.move()-allows the robot to move ()
robot.get_power()-returns how much power there is remaining for the robot to use ()
robot.check_fuel()-checks if there is fuel left in the robots tank and returns information about what is left (~1/2 full)
anything else you can think of! -defining instance variables and parameters as needed would be key to define further functionality.
2.Create another class called “cars” that includes the following functions or methods within it (again, mimic real life):
car.start()-allows the car to start up ()
car.drive()-allows for movement/ travel and returns destination reached at the end of drive ()
anything else you can think of! ~ defining instance variables and parameters as needed would be key to define further functionality.
3.Use these two classes to solve a problem in your world: How many cars could we fit into a parking lot if each one is only allowed space if there are no other cars? If they must park diagonally, then how many more do we get?
Assignment Activity 4: Utilize Object-Oriented Programming concepts to store and retrieve data using text files.
Object-oriented programming is a way of structuring an application so that the program can change its internal structures without altering or breaking any of the external interfaces.
The idea behind continuity makes object orientation useful for developing applications that require data to be stored in and retrieved from a text file, because changes to the text format won’t break the code.
A basic principle of object orientation is encapsulation: packaging functionality inside an opaque black box and hiding its inner workings.
This protects code inside from outside interference, and hides it from accidental modification by those who don’t need to know how it works. Encapsulation keeps other features in your programs clean and simple, which makes debugging much easier – you only have one module with complex code to debug , rather than having to sift through your entire program looking for problems.
We can use encapsulation to help us store data in text files, because it lets us hide the messy details of how we store and retrieve that data from our client programs. It also does not make much sense if you have readily available libraries like JSON or XML, these are supported by most programming languages today.
Assignment Activity 5:Adapt Object-Oriented Programming concepts and techniques to solve problems using inheritance and polymorphism.
The easiest way to adapt object-oriented programming concepts is to try developing a system. From that, you will be able to identify which lessons are hard and which are easy for you.
Developing the system will also confirm any assumptions you may have made about what it would mean to “learn” object-oriented programming. Like anything else, success in learning OOP requires understanding the material thoroughly before trying something new.
For example, when is it appropriate to use inheritance vs inheritance? When should I throw an exception vs handling an error explicitly? When should I for each over a list or generate a list of objects from scratch? The answers depend on your situation and often your experience with previous languages like Java or C++ (C# is similar in many cases, although the syntax may be different).
Take Help With CSC238 Group Projects Online From Malaysian Helpers
Get the best quality answers on CSC238 – OBJECT ORIENTED PROGRAMMING in Malaysia
The assignment sample above is based on CSC238 – OBJECT ORIENTED PROGRAMMING.
Assignment helper kl has been providing students with excellent academic writing services and professional help in choosing the right topic for their assignment.
They could use their skills to make studying easier for others through online assignments such as programming assignment help or case study assistance without any complicated language barriers getting in the way.
Qualified experts from Malaysia Assignment Help are also available 24/7 so you can be sure your work will always get done on time! Without our dissertation helper there would have never been anyone able to offer term papers writing at prices affordable enough not only give yourself an advantage over other competitors but save loads too!