CMPSC 121 Chapter Notes -Email Client, Java Syntax, European Route E45

59 views6 pages
School
Course
Professor

Document Summary

Name __ __________: write a crc card for a class called contact that will be used in an email client application. The template is included below for your convenience but make sure to label each section of the table. (1 point) Contact book: write a java class called contact. The class includes instance variables for the contact name and contact email address. The class includes a constructor that takes a string parameter to initialize the contact name instance variable. The class should include accessors and mutators for both instance variables. (2 points) public class contact { private string contactname; private string emailaddress; public contact(string newcontactname){ Emailaddress = newemailaddress: what is the public interface of the class contact? (1 point) public interface contact{ public void addcontact(string contact); public void printcontacts(); Contact getcontactbyemailaddress(string emailaddress); public static void main(string[] args){ Contact mycontact = new mycontact(): write a java statement to declare and instantiate an instance of the class contact as defined above.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions