The answers of the assignments of Java quizmaster for beginners Teacher's guide by Sar Maroof
Author:Sar Maroof
Language: eng
Format: azw3
Published: 2017-08-29T07:00:00+00:00
Assignment chapter 8
package assignment.calendar;
public class DateInfo
{
private int day = 16;
private int month = 3;
private int year = 1998;
public DateInfo(int day, int month, int year)
{
this.day = day;
this.month = month;
this.year = year;
}
public String getDateFormat()
{
return month + "-" + day + "-" + year;
}
}
package assignment.personal_data;
import assignment.calendar.DateInfo;
public class Student
{
private String name;
private DateInfo birthDate;
public static void main(String[] args)
{
Student isab = new Student();
Student dav = new Student();
DateInfo bdIsab = new DateInfo(28, 8, 1998);
DateInfo bdDav = new DateInfo(13, 9, 1996);
isab.name = "Isabella";
isab.birthDate = bdIsab;
dav.name = "David";
dav.birthDate = bdDav;
System.out.println("---First Student---");
System.out.println("Name: " + isab.name);
System.out.println("Birth date: " + isab.birthDate.getDateFormat());
System.out.println("---Second Student---");
System.out.println("Name: " + dav.name);
System.out.println("Birth date: " + dav.birthDate.getDateFormat());
}
}
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12569)
Hello! Python by Anthony Briggs(9914)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Dependency Injection in .NET by Mark Seemann(9337)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8296)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7062)
Microservices with Go by Alexander Shuiskov(6824)
Practical Design Patterns for Java Developers by Miroslav Wengner(6741)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6684)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Angular Projects - Third Edition by Aristeidis Bampakos(6088)
The Art of Crafting User Stories by The Art of Crafting User Stories(5615)
NetSuite for Consultants - Second Edition by Peter Ries(5554)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5356)
Kotlin in Action by Dmitry Jemerov(5062)
