Java/Runden und New Zealand/Natural Wonders: Unterschied zwischen den Seiten

Aus ZUM-Unterrichten
< Java(Unterschied zwischen Seiten)
main>Karl Kirst
K (- Kurzinfo Java)
 
(Die Seite wurde neu angelegt: „ == Mixed Grammar == Complete the following text. Use the correct forms of the words in brackets and find your own to replace the question marks. <div class=…“)
 
Zeile 1: Zeile 1:
{{Kurzinfo|Software}}


{{Idee|
== Mixed Grammar ==
Einordnung: Nach der Einführung von Objekt, Klasse, Methode, elementare Datentypen
Complete the following text. Use the correct forms of the words in brackets and find your own to replace the question marks.


Variablen vom Typen double haben z.T. sehr viele Nachkommastellen. Mit folgendem Trick schaffen wir es, die Variablen auf zwei Stellen zu runden.
<div class="lueckentext-quiz" lang="en">
Last year I went to the ''most beautiful (beautiful)'' national park in NZ - Orakei Korako. It's geysers aren't '' as tall (tall)'' as those of Yellowstone but it's way more colorful.


Vorgehen: Eine Zahl, z.B. 3.14159265 multipliziere ich mit 100:  314.159265.
I ''spent(spend)'' three days there and met an old man. "Since my school day I ''have dreamt|have dreamed|have been dreaming(dream)'' to come heref," he told me.w.  
Dann runde ich  und erhalte 314. Danach teile ich durch 100 und bekomme 3.14.}}


<source lang="java">
// (...)


public double rundeAufZweiStellen(double zahl)  
features caves and thermal wonders. The highlight of the valley is a variety of silica terraces. The Folden Fleeces Terrace, which is bronze and golden(ish) steaming terraces, are the biggest and most impressive of them all. We can’t help but be mesmerised by the bubbling mud pools too.
his peers and very shy. He his daily train journeys to school reading adventure stories: "Since my school day I ''have read|have been reading(read)'' every book I could get hold of," he once mentioned in an interview.  
      return Math.round( zahl * 100 ) / 100.0;
}
</source>


{{Übung|
# Wie ruft man diese Methode auf, wenn man eine Zahl runden möchte?
# Schreiben Sie die Methode rundeAufDreiStellen(). Für fortgeschrittene: RundeAufXStellen()
}}


==Weblinks==
If I ''(had known(know)'' this, I ''would have come(come)'' here earlier.
* Dieses Beispiel stammt aus Kapitel 2 des [http://informatik.zum.de/pieper/ Java Readers]
</div>
* vgl. [http://www.torsten-horn.de/techdocs/java-basics.htm Java-Basics]


==Siehe auch==
{{NZ}}
* [[Java]]
 
[[Kategorie:Java]]
[[Kategorie:Linksammlung]]
[[Kategorie:Unterrichtsideen/Informatik]]

Version vom 7. November 2019, 07:16 Uhr

Mixed Grammar

Complete the following text. Use the correct forms of the words in brackets and find your own to replace the question marks.

Last year I went to the most beautiful (beautiful) national park in NZ - Orakei Korako. It's geysers aren't as tall (tall) as those of Yellowstone but it's way more colorful.

I spent(spend) three days there and met an old man. "Since my school day I have dreamt|have dreamed|have been dreaming(dream) to come heref," he told me.w.


features caves and thermal wonders. The highlight of the valley is a variety of silica terraces. The Folden Fleeces Terrace, which is bronze and golden(ish) steaming terraces, are the biggest and most impressive of them all. We can’t help but be mesmerised by the bubbling mud pools too.

his peers and very shy. He his daily train journeys to school reading adventure stories: "Since my school day I have read|have been reading(read) every book I could get hold of," he once mentioned in an interview.


If I (had known(know) this, I would have come(come) here earlier.