Diferență între revizuiri ale paginii „OOP Lab Task 1”
De la WikiLabs
Jump to navigationJump to searchLinia 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
- The Object Oriented Paradigm; Classes and Objects
- Notions About the Java Language
- Writing and Executing a Java Program
- Java Syntax; A Program's Lexical Structure
- Java Coding Conventions
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().