OOP Lab Task 1: Diferență între versiuni

De la WikiLabs
(Pagină nouă: == Required Tutorials == * Object Oriented Paradigm; Classes and Objects * Notions About the Java Language * Writing and Executing a Java Program * [[Java Syntax; A Progr...)
 
(Required Tutorials)
Linia 1: Linia 1:
 
== Required Tutorials ==
 
== Required Tutorials ==
  
* [[Object Oriented Paradigm; Classes and Objects]]
+
* [[The Object Oriented Paradigm; Classes and Objects]]
 
* [[Notions About the Java Language]]
 
* [[Notions About the Java Language]]
 
* [[Writing and Executing a Java Program]]
 
* [[Writing and Executing a Java Program]]

Versiunea de la data 22 octombrie 2013 12:20

Required Tutorials

Requirements

  • Write a class called Message which should abstract out a physical letter. Class Message should have fields for sender, receiver and content, of type string of characters.
  • Write a method called print(), member of class Message, which will output in the standard stream (console), the information related to Message objects, in the format: From <sender> to <receiver>: <content> (use System.out.println());
  • Write a class called TestClass which should only contain the main method as a member, in which you should instantiate 3 objects of type Message, initialize their fields with different values and call, for each object, the method print().