Object-Oriented Programming代写 Lab sessions are 50 minutes long. During the first 20 minutes students are supposed to work on a simple class project.
Engineering Problem Solving
Lab 7 – Object-Oriented Programming
- ImplementObject-OrientedProgramming Classes
About the labs:Object-Oriented Programming代写
- Labsessions are 50 minutes long. During the first 20 minutes students are supposed to work on a simple class projec The last 30 minutes should be used for the class quiz.
- Matlab,class-notes and any for of web browsing (Even submitting files on canvas) are not allowed during the quiz time.
- Studentscan submit their class project files within 24 hours.
- Studentsonly get one chance to submit their quiz answers at the end of each lab session.Object-Oriented Programming代写
A friendly advice: If you are out of time for the class project, you can Email yourself the work you have done so to work on it later from your own computer.
This lab is worth 50 points.
Problem 1: Dog
Create a class named “dog” to manage a dog training business including the followingproperties: name, breed, age, weight, tricks, and number of visits the dog has had to the training school. For the class implement the following tasks:
-Create a dog example object with the information: Fido, Australian Shepard, 2 years old, 50 lbs of weight, knows tricks ‘sit’ and ‘shake’, and has had 10 visits to the training school.Object-Oriented Programming代写
– After a year, Fido had 20 visits to dog training, weights 55 lbs, and knows additional trick ‘roll over’. Write a MATLAB scripts to update the information of Fido. Your code should include methods to update each property separately by adding changes to original data.
Problem 2: Bank Account
Create an object oriented programing account class for a bank. Each account class contains the following information (properties): name on the account, account type, balance, interest accrual rate, account number, pin number, and whether or not the account was locked by entering the incorrect pin. Also include an account number private property which cannot be changed and a pin property that can be reset but can’t be viewed publicly.Object-Oriented Programming代写
As an example create an object: A bank customer with name ‘A. Smith’, account type – checking, balance $5,000, yearly interest rate 1%, pin number 0101, account number 1234567, and account not locked (locked flag set to 0).
Your class must include methods that do the following:
- Whena customer makes a deposit of $5000 at the bank, add the deposit amount to the existing balance and show the updated balance and the information (non-private information) of the account.
- Calculate the interest made on the account this year if the interest is the balance*yearly interest rate. Add this to the existing balance and display “The interestaccrued this year is and the new balance is “ with the correct values shown.
-When a customer wants to view the account balance, prompt the user for the pin number. If a customer enters the correct pin, show the account balance and account number. If a customer enters the incorrect display ‘account locked’ and set the locked flag to 1.Object-Oriented Programming代写
-When a customer is locked out of their account, prompt them to enter the account number. If the account number is correct, prompt the user to set a new pin number andclear the locked flag by setting it to 0. If the customer enters the wrong account number, display ‘Wrong account number, please try again later’.
其他代写：algorithm代写 analysis代写 app代写 assembly代写 assignment代写 code代写 course代写 CS代写 cs作业代写 Data Analysis代写 dataset代写 data代写 finance代写 homework代写 java代写 Task代写 web代写 代写CS 代写CS作业 作业加急 北美cs代写 北美代写 北美作业代写 数据分析代写 编程代写