extra info for other languages

This commit is contained in:
Timo Hocker 2020-04-01 15:29:10 +02:00
parent 4a9de2897c
commit 551e8835d7
6 changed files with 24 additions and 1 deletions

View File

@ -3,6 +3,7 @@
int main() {
// create a new car and store it in the variable 'a'
// in contrast to java, c++ does not need initialization with the 'new' keyword here.
car a;
// set some data for that car
a.manufacturer = "Benz";

View File

@ -1,4 +1,4 @@
/*
/*
Basic Car class
just here to make the demonstration in the main file possible

5
java/instances/README.md Normal file
View File

@ -0,0 +1,5 @@
# Java Example
Relevant Files:
- [main.java](./main.java)

10
rust/instances/README.md Normal file
View File

@ -0,0 +1,10 @@
# Rust Example
## Language specific
- Rust doesn't use the 'new' keyword
- Classes in Rust require all attributes to be defined at all times, so you have to define all the data on creation.
Relevant Files
- [main.rs](./src/main.rs)

View File

@ -3,6 +3,8 @@ use car::Information;
fn main() {
// create a new car and store it in the variable 'a'
// rust also doesn't use the 'new' keyword
// all attributes have to be defined upon creation of the object
let a = car::Car {
// set some data for that car
manufacturer: "Benz".to_string(),

View File

@ -0,0 +1,5 @@
# Typescript Example
Relevant Files
- [index.ts](./index.ts)