OOP Lab Task 1: Diferență între versiuni

De la WikiLabs
Jump to navigationJump to search
Fără descriere a modificării
Linia 5: Linia 5:
* [[Writing and Executing a Java Program]]
* [[Writing and Executing a Java Program]]
* [[Java Syntax; A Program's Lexical Structure]]
* [[Java Syntax; A Program's Lexical Structure]]
* [[Coding Conventions]]
* [[Java Coding Conventions]]


== Requirements==
== Requirements==

Versiunea de la data 9 martie 2014 10:39

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().