Write your favourite recipe in pseudocode

Assignment Help Programming Languages
Reference no: EM132292589

Principles of Programming Assignment - Weekly Programming Work

Learning Outcomes - This assessment addresses the following subject learning outcomes:

a) Synthesise the tenets of procedural programming into the object-oriented paradigm.

b) Apply an integrated development environment (IDE) using the principles of agile methodology to create, compile, test and run programs to address business problems.

c) Apply object-oriented concepts to construct classes and methods to solve problems and make decisions.

This assignment is designed for you to progressively add to your understanding of software development using a mid-level programming language that supports object-oriented development. It also introduces you to some of the systems analysis techniques that will feature in later subjects of the Master of Business Information Systems.

Instructions: Submit the learning activities for each module.

Module 2 -

2.1 -

1. Write your favourite recipe in pseudocode.

= Include the recipe for cake or anything which is familiar with Nepalese food item.

2. Write simple pseudocode that solves the problem of getting ready in the morning to attend work or the university.

3. Write some more advanced pseudocode that includes a selection based on a condition for getting ready in the morning to attend work or the university. An example test might be use the iron to press your clothes

4. Finish your pseudocode now with an iteration of your choosing. An example, if you cannot think of one is cycle through your outfits until you find the one you think looks best.

2.2 -

1. List as many things that can go wrong in an online purchase transaction that you can think of. For each of these potential errors, think of a way in which a set of instructions can protect against it failing to achieve its objective.

2. With all the knowledge you gained in this module, write an algorithm that facilitates a web-based online transaction. Make whatever assumptions you deem necessary and make them known at the top of your algorithm.

MODULE 3 -

3.2 Activities -

There are several activities in this module and you are expected to complete all of these in the labs or in class or in your own time. The first of these is to reproduce any and all of the worked examples in the module content and to review the readings and videos. Then, work your way through these exercises:

1. Access the Australian Taxation Office website and find the current tax tables for individuals. Write a program that asks the user to enter their tax file number (using a 'string' data type) and then to enter their taxable income for the current financial year. If the user does not have an Australian tax file number, they should enter '0' instead. Then, based on the taxable income, the program should return the tax payable on their taxable income.

2. Write a program that helps with children's multiplication. It should ask the user, which number they are learning to multiply and then produce a set of 12 multiples (i.e. from one through twelve). When execution finishes it should continue to ask for numbers to multiply unless a 0 is entered at the keyboard.

3. Write a program that accepts a date from the user in three parts: a month, a day and a year. Ensure that the date values are valid before printing the final value to the screen for the user.

4.1 Activities -

We can imagine an example object such as a car. A car will have the following members (and several others):

  • colour;
  • brand;
  • fuel tank capacity; and
  • odometer reading.

Apart from this, it may also have the following methods:

  • start();
  • accelerate();
  • brake(); and
  • stop().

The car can be thought of as an object since it has characteristics (members) such as its colour and it can perform operations (methods) on itself such as accelerating and braking. In this analogy, it can be easily seen that a car object is self-contained or encapsulated. The mechanical details of how the car performs its operations does not matter to the driver since they are using the car to travel from their point of origin to their point of destination; therefore, we can see that the details have been abstracted or hidden away.

Up until now we have discussed a car as a single object. But, as we know, there can be several cars, even several red cars of the same make and model. Therefore, the object-oriented paradigm includes a mechanism to specify what all of those cars would look and behave like. That mechanism is called a class and is a central concept in object-oriented programming.

A class is said to be the template for all objects in that family of objects. In your programming you will implement the members and methods in the above two lists in a class. When you later initialise a car object, the object is an instance of a class. You would specify a class in the following way:

class Car {

string strColour;

string strBrand;

float fltFuelTankCapacity;

int intOdometerReading;

public:

void start();

void accelerate();

void brake();

void stop();

};

Like the convention we have already established in this subject, a class must first be declared before we can refer to it later in the code. Noticing that the declaration has a semicolon that follows it, the next lines of code would be the implementations of the class methods.

4.1 Readings - Mosh 2018 'Object-oriented Programming in 7 Minutes' Programming with Mosh.

 4.1 Activities -

There are a number of activities in this module and you are expected to complete all of these in the labs or in class or in your own time. The first of these is to reproduce any and all of the worked examples in the module content and to review the readings and videos. Then, work your way through these exercises:

1. Taking the in-class example of the car, continue coding this example but include one or more additional variables for the speed of the car. Include mutator and accessor methods for the car's speed and use them in the start(), accelerate(), brake() and stop() methods to extend their functionality. When the car starts, initialise its speed to 0. Allow the accelerator method to increase the speed by a given increment and the brake method to decrease by a given decrement. Print the current speed to the screen.

2. Race time: take the same example and separate the class into a header file. Write another program that instantiates two car objects, one small and the other large (if you don't know cars, look up examples for brands of cars and their fuel tank capacities). In your code, start each car and then accelerate each car at different rates. Do this in a loop three times for each car and then reverse the rates for braking. Print the name of the car that comes to a complete stop first and declare the other car the winner.

4.2 Activities -

1. Taking your work from the first half of the module, create constructor and destructor methods for the 'Car' class.

2. Write a program using the object-oriented paradigm that keeps track of bank accounts. Each class should have constructor and destructor methods, but the choice of members will be up to you. Start with a class for 'account' and then allow for different types of derived classes, such as 'savings account' and 'credit card account.' A bank account should allow funds to be added to it as well as withdrawn but not to be overdrawn. A credit card account should allow funds to be charged to it but not more than its limit. In the main () function, open a savings account with $10,000 and then make three withdrawals of $4,000, if there are enough funds. Open a credit card account, with a limit of $3000 and make two charges of $2000 if there are enough funds. If you breach the conditions for each, display an appropriate error message.

Attachment:- Assignment Files.rar

Reference no: EM132292589

Questions Cloud

Develop to be able to succeeed in a global business : A global mindset is critical skills that global leaders need to develop to be able to succeeed in a global business context charactersied
Bill gates-teachers need real feedback : Clear, systematic feedback is crucial to growth, says Microsoft Founder and Philanthropist Bill Gates.
Critical thinking skills to determine what action : How come ethical decision making may take some critical thinking skills to determine what action is appropriate?
What is the difference between managers and leaders : What is the difference between managers and leaders? Is it possible to be an effective manager but not an effective leader?
Write your favourite recipe in pseudocode : MIS501 Principles of Programming Assignment - Weekly Programming Work, Torrens University Australia. Write your favourite recipe in pseudocode
Identify the type of data you have collected : Construct the appropriate control charts, based on the knowledge gained from the Module Six overview.
What is functional strategy : What is functional strategy and how does Human Resources utilize it?
External business environments of nike company : Please help me to analysis the external business environments of NIKE company. what is the external environment of NIKE and it's principle of managment?
Make post that compares and contrasts FMEA and RCA : Make a post that compares and contrasts FMEA and RCA. What are the steps of each? How are they different?

Reviews

len2292589

4/24/2019 10:59:43 PM

The MIS501 Principles of Programming subject is designed for you to progressively add to your understanding of software development using a mid-level programming language that supports object-oriented development. It also introduces you to some of the systems analysis techniques that will feature in later subjects of the Master of Business Information Systems. In order for you to do well in this subject, it is imperative that you undertake all of the learning activities in the modules.

len2292589

4/24/2019 10:59:37 PM

The learning activities are presented as a way of scaffolding your learning so that you can attempt the building blocks of the assessments and be in a safe environment to fail and to learn from them. Therefore, doing your learning activities and seeking feedback from them from peers and from the learning facilitator is the single best way of preparing for doing well in this assessment. Instructions: Students are required to submit the learning activities for each module. Submission Instructions: Combine each C++ file into a zipped archive and submit by the due date.

Write a Review

Programming Languages Questions & Answers

  Generate code for the given three address statements

Generate code for the given three-address statements assuming all variables are stored in memory locations.

  Write application to store three tests grades of students

Write the application to store three tests grades of 20 students in two dimensional array GRADES. Then program must prompt user to select from the menu.

  Write one instruction to reverse the lsb

write ONE instruction to reverse the LSB of the 2nd and 3rd elements of arr - Write code to determine if a data value is a power of 2,

  Implement a restricted form of classic problem of arithmetic

You implement a restricted form of the classic problem of simplifying arithmetic expressions. You first implement two simplification operations

  Write constructor which needs two string parameters

Generate a class named Student which includes String data fields for firstName and lastName. Prepare a constructor which needs two String parameters to populate firstName and lastName fields.

  Make simple html document add a comment

Make simple html document Add a comment Add a hyperlink to www.google.com Create simple HTML headings h1 to h6

  Create class to include fields for length-width in inches

Create a class name Tape that includes fields for length and width in inches and properties for each field. Also include a ToString () method that returns a string constructed from the return value

  Perform internal correctness checking of data

Perform internal correctness checking of data and those which do not, Provide diverse and comprehensive suites of built-in functionality and those with a more limited set of features.

  Write program to print names of files with similarity

Write down the program which prints names of two files with highest similarity among files in collection, and names of two files with lowest similarity.

  State space search using prolog and lisp

State Space Search using Prolog and LISP - solve problem using the Prolog computer programming language

  Construct a finite state machine m that accepts

Construct a finite state machine M that accepts these variables, constants, assignment operators and others, as well as all the reserved words for this primitive programming language that you are defined in Problem 1.

  How to assign new value to element of array indexed by j

Write single statement which assigns a new value to element of array indexed by j . This new value must be equal to twice the value stored in next element of the array (i.e. element after the element indexed by j.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd