Coder Social home page Coder Social logo

teachmeskills_c26_lesson_6_hw's Introduction

TeachMeSkills_C26_Lesson_6_HW

my homework number 6

This repository was create for my homework number 6.

Task 1.

Create a CreditCard class with the fields account number and current amount in the account. Create one constructor with two parameters. Add a method that allows you to charge the amount to your credit card. The method takes an amount as input and adds this amount to the current one. Consider how you should set the method's input and output parameters. Add a method that allows you to withdraw a certain amount from the card. The method takes an amount as input and subtracts this amount from the current one. Consider how you should set the method's input and output parameters. Add a method that displays current card information. Write a program that creates three objects of the CreditCard class that are given an account number and an initial amount. Test script for verification: Place money on the first two cards and withdraw from the third. Display the current status of all three cards.

Task 2.

Create a class to describe a student in our group. Class fields: first name, last name, passport number, group name (you can add your own fields if desired - for example, age). Create objects of this class for each student in our group. Place all these objects into an array. Loop through the array with a for-each loop and output information to the console.

Addditional task:

Additional task 1.

The user makes a deposit in average rubles for a period of several years at 10% per annum. (every year the size of his contribution increases by 10%. This money is added to deposit amount, and there will also be interest on them next year). Write a bank program that accepts arguments after a year and returns. The amount that will be in the user's account.

teachmeskills_c26_lesson_6_hw's People

Contributors

ivansavch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.