Javascript V: Object-Oriented Programming - IT Assignment Help

Download Solution Order New Solution
Assignment Task

 

Introduction
WELCOME TO THE FIFTH JAVASCRIPT TASK!
In this Task, you will learn about the concept of object-oriented programming and how to create JavaScript objects. This is an extremely important concept! JavaScript uses objects extensively. You will see by the end of this task, how you have actually been using JavaScript objects all along

WHAT IS OBJECT-ORIENTED PROGRAMMING?
Object-oriented programming (OOP) has become the dominant programming methodology for building new systems. C++, an object-oriented version of C, was the first OO language to be used widely in the programming community. This adoption inspired most contemporary programming languages like JavaScript, C#, and Objective-C to be designed as object-oriented/object-based languages. Even languages which were not primarily designed for object-oriented programming, like PHP and Python, have evolved into supporting fully fledged object-oriented programming.
So why is OOP so popular? Firstly, we as humans think in terms of objects and designers of modern technologies have used this knowledge to their advantage. For instance, we refer to the window that appears when we power up our computer as a “desktop”. We keep shortcuts and files we use frequently on this “desktop.” But we know this is no real desk! We refer to the folder that our files get transferred to when we delete them as a “recycle bin.” But is it really a bin? We use these terms in a metaphorical sense because our minds are already familiar with these objects. Software designers leverage this familiarity to avoid unnecessary complexity by playing to the cognitive biases of our minds.
You know from your experience as a programmer, and from the previous tasks in this course, that solving computation problems can be complex. It is not just the process of developing an algorithm to solve a problem that is challenging, but the problem domain is often loaded with delicate intricacies that require expert knowledge to understand. These two problems contribute to the overall complexity of designing and implementing software that solves business problems. OOP uses our mind’s natural affinity to think in terms of objects by designing a solution in terms of objects. This is a paradigm shift away from the procedural paradigm that is described
under the next subheading.

PROCEDURAL PROGRAMMING VS OBJECT-ORIENTED PROGRAMMING
Procedural code executes in a waterfall fashion. We proceed from one statement to another, in sequence. The data are separated from the code that uses them. Functions are defined as standalone modules but they have access to variables we’ve declared outside the function. These two properties: sequential execution of code and the separation of data and the code that manipulates the data are what distinguish procedural code.

Compulsory Task
Follow these steps:
- Create a file called cars.html. You are going to create a webpage for a car salesman. The page will display details about cars that are for sale. Create whatever HTML you deem appropriate for this task and style the page as you like. However, be sure that the information about the cars for sale are displayed on the webpage programmatically (see the next point) - not hard coded with HTML.

- Create a file cars.js. Within cars.js:
o Create 5 car objects using a constructor function.
o Each car object should have the following properties: make, model, colour, image, registration number, price.
o Each car object should also include a showMore() method. This method should display a dialogue that displays all the details about the specific car object.

- Whenever a user clicks on an image of a car, the showMore() method should be called and all the information about the car, including the registration number, price etc should be displayed.

 

This IT Assignment has been solved by our IT experts at My Uni Papers. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.