Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lp1-2020.5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Samuel Oliveira
lp1-2020.5
Commits
632a1ade
Commit
632a1ade
authored
Jul 06, 2020
by
Samuel Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adicionando aula 2
parent
5a2dfcf8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
+48
-0
Aula 2/cliente.hpp
Aula 2/cliente.hpp
+9
-0
Aula 2/conta.cpp
Aula 2/conta.cpp
+14
-0
Aula 2/conta.hpp
Aula 2/conta.hpp
+12
-0
Aula 2/main.cpp
Aula 2/main.cpp
+13
-0
No files found.
Aula 2/cliente.hpp
0 → 100644
View file @
632a1ade
#include <string>
using
namespace
std
;
class
Cliente
{
public:
string
nome
;
string
cpf
;
};
\ No newline at end of file
Aula 2/conta.cpp
0 → 100644
View file @
632a1ade
#include "conta.hpp"
void
Conta
::
saca
(
double
valor
){
this
->
saldo
-=
valor
;
}
void
Conta
::
deposita
(
double
valor
){
this
->
saldo
+=
valor
;
}
void
Conta
::
transfere
(
double
valor
,
Conta
&
c
){
this
->
saldo
-=
valor
;
c
.
deposita
(
valor
);
}
\ No newline at end of file
Aula 2/conta.hpp
0 → 100644
View file @
632a1ade
#include "cliente.hpp"
class
Conta
{
public:
int
numero
;
Cliente
titular
;
double
saldo
;
void
saca
(
double
valor
);
void
deposita
(
double
valor
);
void
transfere
(
double
valor
,
Conta
&
c
);
};
\ No newline at end of file
Aula 2/main.cpp
0 → 100644
View file @
632a1ade
#include <iostream>
#include "conta.hpp"
using
namespace
std
;
int
main
(){
Conta
c
;
c
.
titular
.
nome
=
"José"
;
c
.
titular
.
cpf
=
"000.000.000-00"
;
cout
<<
"Nome do titular da conta: "
<<
c
.
titular
.
nome
<<
endl
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment