SlideShare a Scribd company logo
1 of 19
Assignment #2/.classpath
Assignment #2/.project
Assignment #2
org.eclipse.jdt.core.javabuilder
org.eclipse.jdt.core.javanature
Assignment #2/.settings/org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enable
d
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
Assignment #2/Assignment #2.javaAssignment #2/Assignment
#2.javapackage assignment2;
import java.util.Date;
publicclassTestCells{
publicstaticvoid main(String[] args){
Customer customer =newCustomer("ziyad","724-506-
3587",100.00,00.50,300,200);
Invoice invoice=newInvoice(customer);
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.printInvoice();
}
}
Assignment #2/bin/assignment2/Call.classpackage assignment2;
publicsynchronizedclass Call {
private String namber;
private java.util.Date date;
private int minute;
private boolean offPeak;
public void Call(String, java.util.Date, int);
public String getNamber();
public void setNamber(String);
public java.util.Date getDate();
public void setDate(java.util.Date);
public int getMinute();
public void setMinute(int);
public boolean getOffPeak();
}
Assignment #2/bin/assignment2/Customer.classpackage
assignment2;
publicsynchronizedclass Customer {
private String name;
private String number;
private double planPrice;
private double rateForExtraMinutes;
private int peakMinutesIncluded;
private int offpeakMinutesIncluded;
public void Customer(String, String, double, double, int, int);
public String getName();
public void setName(String);
public String getnumber();
public void setNumber(String);
public double getPlanPrice();
public void setPlanPrice(double);
public double getRateForExtraMinutes();
public void setRateForExtraMinutes(double);
public int getPeakMinutesIncluded();
public void setPeakMinutesIncluded(int);
public int getOffpeakMinutesIncluded();
public void setOffpeakMinutesIncluded(int);
}
Assignment #2/bin/assignment2/Invoice.classpackage
assignment2;
publicsynchronizedclass Invoice {
private Customer customer;
private Call[] calls;
private int noCalls;
private double amountDue;
private int offPeakMinutesUsed;
private int peakMinutesUsed;
public void Invoice(Customer);
public void addCall(Call);
public int getNoCalls();
public Call getCall(int);
private int calcPeakMinutesUsed();
private int calcOffPeakMinutesUsed();
public void printInvoice();
}
Assignment #2/bin/assignment2/TestCells.classpackage
assignment2;
publicsynchronizedclass TestCells {
public void TestCells();
publicstatic void main(String[]);
}
Assignment #2/src/assignment2/Call.javaAssignment
#2/src/assignment2/Call.javapackage assignment2;
import java.util.Date;
publicclassCall{
privateString namber;
privateDate date;
privateint minute;
privateboolean offPeak;
publicCall(String namber,Date date,int minute){
super();
this.namber = namber;
this.date = date;
this.minute = minute;
this.offPeak= date.getHours()>=18;
}
publicString getNamber(){
return namber;
}
publicvoid setNamber(String namber){
this.namber = namber;
}
publicDate getDate(){
return date;
}
publicvoid setDate(Date date){
this.date = date;
}
publicint getMinute(){
return minute;
}
publicvoid setMinute(int minute){
this.minute = minute;
}
publicboolean getOffPeak(){
return offPeak;
}
}
Assignment #2/src/assignment2/Customer.javaAssignment
#2/src/assignment2/Customer.javapackage assignment2;
publicclassCustomer{
privateString name;
privateString number;
privatedouble planPrice;
privatedouble rateForExtraMinutes;
privateint peakMinutesIncluded;
privateint offpeakMinutesIncluded;
publicCustomer(String name,String number,double planPrice,do
uble rateForExtraMinutes,
int peakMinutesIncluded,int offpeakMinutesIncluded){
super();
this.name = name;
this.number = number;
this.planPrice = planPrice;
this.rateForExtraMinutes = rateForExtraMinutes;
this.peakMinutesIncluded = peakMinutesIncluded;
this.offpeakMinutesIncluded = offpeakMinutesIncluded;
}
publicString getName(){
return name;
}
publicvoid setName(String name){
this.name = name;
}
publicString getnumber(){
return number;
}
publicvoid setNumber(String number){
this.number = number;
}
publicdouble getPlanPrice(){
return planPrice;
}
publicvoid setPlanPrice(double planPrice){
this.planPrice = planPrice;
}
publicdouble getRateForExtraMinutes(){
return rateForExtraMinutes;
}
publicvoid setRateForExtraMinutes(double rateForExtraMinutes
){
this.rateForExtraMinutes = rateForExtraMinutes;
}
publicint getPeakMinutesIncluded(){
return peakMinutesIncluded;
}
publicvoid setPeakMinutesIncluded(int peakMinutesIncluded){
this.peakMinutesIncluded = peakMinutesIncluded;
}
publicint getOffpeakMinutesIncluded(){
return offpeakMinutesIncluded;
}
publicvoid setOffpeakMinutesIncluded(int offpeakMinutesInclu
ded){
this.offpeakMinutesIncluded = offpeakMinutesIncluded;
}
}
Assignment #2/src/assignment2/Invoice.javaAssignment
#2/src/assignment2/Invoice.javapackage assignment2;
publicclassInvoice{
privateCustomer customer;
privateCall[] calls =newCall[10];
privateint noCalls =0;
privatedouble amountDue;
privateint offPeakMinutesUsed;
privateint peakMinutesUsed;
publicInvoice(Customer customer){
this.customer = customer;
}
publicvoid addCall(Call call){
calls[noCalls++]= call;
}
publicint getNoCalls(){
return noCalls;
}
publicCall getCall(int n){
return calls[n];
}
privateint calcPeakMinutesUsed(){
peakMinutesUsed =0;
for(int n =0; n < noCalls; n++){
Call callT = getCall(n);
if(callT.getDate().getHours()<18){
peakMinutesUsed = peakMinutesUsed+callT.getMinu
te();
}
}
return peakMinutesUsed;
}
privateint calcOffPeakMinutesUsed(){
offPeakMinutesUsed =0;
for(int n =0; n < noCalls; n++){
Call callT = calls[n];
if(callT.getDate().getHours()>=18){
offPeakMinutesUsed = offPeakMinutesUsed+callT.ge
tMinute();
}
}
return offPeakMinutesUsed;
}
publicvoid printInvoice(){
peakMinutesUsed=calcPeakMinutesUsed ();
offPeakMinutesUsed= calcOffPeakMinutesUsed();
amountDue = customer.getPlanPrice();
System.out.printf("CellsRUS Invoice Date%snn","Date here"
);
System.out.printf("customer %s telepohne%snn", customer.get
Name(), customer.getnumber());
System.out.printf(" plan Price $%4.2f Rate For Extra Minutes $
%2.2fnn", customer.getPlanPrice(), customer.getRateForExtra
Minutes());
System.out.printf("Peak Minutes Inclued %d off Peak Minutes I
nclued %dnn", customer.getPeakMinutesIncluded(), customer.
getOffpeakMinutesIncluded());
System.out.printf("Peak Minutes Used %d off Peak Minutes Use
d %dnn", peakMinutesUsed, offPeakMinutesUsed );
System.out.printf("amount due $%4.2fn", amountDue );
for(int n =0; n < noCalls; n++){
Call callT = calls[n];
System.out.printf(" %s %s %sn", callT.getNamber(), callT.getD
ate(),callT.getMinute(),callT.getOffPeak());
}
}
}
Assignment #2/src/assignment2/TestCells.javaAssignment
#2/src/assignment2/TestCells.javapackage assignment2;
import java.util.Date;
publicclassTestCells{
publicstaticvoid main(String[] args){
Customer customer =newCustomer("ziyad","724-506-
3587",100.00,00.50,300,200);
Invoice invoice=newInvoice(customer);
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.printInvoice();
}
}
Assignment #2/TestCells.javaAssignment
#2/TestCells.javapackage assignment2;
import java.util.Date;
publicclassTestCells{
publicstaticvoid main(String[] args){
Customer customer =newCustomer("ziyad","724-506-
3587",100.00,00.50,300,200);
Invoice invoice=newInvoice(customer);
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.addCall(newCall("809-324-8278",newDate(2007-
1900,6-1,9,18,10,56),65));
invoice.printInvoice();
}
}
For this report:
• The number of columns is 60.
• The content of the post/reply must be word wrapped.
• A reply must have a left margin which is a 4 space indent from
its parent post.
• If needed, truncate the length of the subject line to the
remaining width of a page.
Likewise for the "by" line.
• Note the "by" line lists only the member's first initial and last
name.
Write a test program to thoroughly test your class. You do not
need to use the example above
(if you do the dates will at least be different). However, make
sure your example has:
• At least 3 posts to the forum
• One post to the forum has no replies
• One post to the forum has at least 2 level of replies (a reply to
a reply)
• One post to the forum has at least 2 replies on the same level
• For replies use a subject line the subject line to which it is a
reply pre-pended with "Re: ".
• Demonstrate that your word wrapping is working for at least
to levels.
• Print both a summary report and a detailed report
• One forum is sufficient
To assist in this assignment, a class called RDate is available on
the T: cosc21 O. This class will
generate simulation data where is instantiation of an RDate is 2
minutes to one hour later than
the previous instantiation.
Additional specification:
• Use RDate for the date of the post and replies. Do not pass it
in as an argument in the
constructor. Instead create an new RDate instance inside the
constructor.
• In the forum defined an addPost method which takes as an
argument a member, a subject
line, and a content string (which could be very long). Have the
method create an instance
of a post and add it to the array. Return the instance of the post.
(this will allow the test
program to add replies to the replies)
• In the post class provide an addReply method which takes as
an argument a member and
a content string. Have the method create an instance of a post
and add it to the array.
Use the current posts subject line to generate the subject line
for the new post. Return the
instance of the post. (this will allow the test program to add
replies to the replies)
• Inyour forum, have a private method that will print the first 5
lines of a report (these are
the same between the two reports except for the second line).
Call the method from the
other two report methods to print the report header.
• No print should appear after the 50th column.
• Abide by good programming practices (e.g., naming
conventions, javadoc, indentation,
use of braces, etc.).
A sample detail report would be:
Assignment Discussion Forum
Detail Report
Owned by: David T Smith No Discussion: 3
Discussions
o or blank
by ~. Blue on Thurs, Feb 16 at 08:30pm
---------------------------
When printing the time logs does it matter if we have a 0 or
do you want a blank space in the overtime column?
Re: 0 or blank
by D. Smith on Thurs, Feb 16 at 07:21pm
I will accept either printing 0 or printing a space when
zero. Interesting question. How would I print space
instead of O?
Re: Re: 0 or blank
by B. Blue Thurs, Feb 16 at 09:21pm
To print a simple space or blank, just do a simple
if statement to print one form or another.
Re: Re: 0 or blank
by J. Green Thurs, Feb 16 at 09:22pm
Write a function to return 4 spaces when 0 or a
String representation of the number using %4d
Problems with formatting.
by C. Hope on Mon, Feb 12 at 01:52pm
I can't get normal hours to print. My code inside my print
method: System. out .printf ("Normal Hours worked: %50d vn ?
,
timeLog.getNormalHours() ) ;
Re: Problems with formatting.
by D. Smith on Mon, Feb 13 at 07:52am
Not sure what your problem is. The %50d looks odd.
Should it be more like %5d? That is only 5 digits wide
not 50.
Reminder - javadoc and formatting
by D. Smith on Tues, Feb 7 at 04:59pm
Reminder, Make sure you have javadoc before the class
declaration and before every public method. Make sure you
Use good formatting.
eose 210 -Object Oriented and GUI Programming
Assignment 3 Problem Statement
Bulletin boards/forums, such as the forums on moodle, provide
a means for individuals to ask
questions in the form of a post. Others may then post replies to
the initial post, and/or to other
replies. All communication in a forum is typically performed
on-line and recorded. For this
assignment it is desired to provide reports of all communication
that has been recorded in a
forum. Since the report is to be printed on paper that has a fix
width, the text of a post needs to
be printed in a word wrapped format. Furthermore, replies need
to be printed with 4 space
indentation to the parent post.
Develop classes to represent forums, posts, and members. A
forum is to have a short one line
title to the forum, and the member owning the forum. Have the
constructor for a member
consists of ONE argument which is the member's full name (i.e.,
first name followed by
middle initial and then last name). A post contains a subject
line, content (which can be a very
long string of text), the member creating the post, and the
date/time of the post.
In your forum class provide two print methods, one to print a
summary of posts and the other to
print the entire contents. A sample for the report produced by
the summary of posts is as
follows:
Assignment Discussion Forum
Summary Report
Owned by: David T Smith No Discussions: 3
Discussions By #Rs On
o or blank BTJ
Problems with formatting. CJH
Reminder - javadoc and format DTS
3
1
o
2/16 /15 08: 30pm
2/12/15 01: 52pm
2/07/15 04:59pm
For this report:
• The number of columns is 50.
• The title for the forum is to be printed in the center of the
page.
• If needed, truncate the length of the subject line of a post to
30 characters.
• The first By is the initials of the member making the post.
• #Rs is the total number of replies in response to this post
(includes nested replies)
• The On is the date and time of the initial post.
• This report does not show the replies themselves.
/
eose 210 -Object Oriented and GUI Programming
Assignment 3
-...,-- -. -
I
"'-------__,." ~
The objectives of this exercise are to:
1) Gain further experience in the use of Eclipse IDE.
2) Gain further experience with control structures.
3) Gain an understanding of Strings within Java.
4) Develop and test a small Java program applying the concepts
of objectives 2 and 3.
5) Practice good programming conventions.
AFTER YOU HAVE COMPLETED: put all the files into a zip
file named [your
name]Assignment3.zip. Include all .class and .java files. Upload
the zip file to Moodle. Print
all source files and output produced by your test program. Tum-
in all materials by the due date.

More Related Content

Similar to Assignment #2.classpathAssignment #2.project Assig.docx

Soundreader.classpathSoundreader.project Soundre.docx
Soundreader.classpathSoundreader.project  Soundre.docxSoundreader.classpathSoundreader.project  Soundre.docx
Soundreader.classpathSoundreader.project Soundre.docxwhitneyleman54422
 
Java设置环境变量
Java设置环境变量Java设置环境变量
Java设置环境变量Zianed Hou
 
JSUG - Tech Tips1 by Christoph Pickl
JSUG - Tech Tips1 by Christoph PicklJSUG - Tech Tips1 by Christoph Pickl
JSUG - Tech Tips1 by Christoph PicklChristoph Pickl
 
Chapter 04 Exercise.classpathChapter 04 Exercise.project.docx
Chapter 04 Exercise.classpathChapter 04 Exercise.project.docxChapter 04 Exercise.classpathChapter 04 Exercise.project.docx
Chapter 04 Exercise.classpathChapter 04 Exercise.project.docxsleeperharwell
 
Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02rhemsolutions
 
Ten useful JavaScript tips & best practices
Ten useful JavaScript tips & best practicesTen useful JavaScript tips & best practices
Ten useful JavaScript tips & best practicesAnkit Rastogi
 
Ordering System IP2buildclasses.netbeans_automatic_buildO.docx
Ordering System IP2buildclasses.netbeans_automatic_buildO.docxOrdering System IP2buildclasses.netbeans_automatic_buildO.docx
Ordering System IP2buildclasses.netbeans_automatic_buildO.docxhopeaustin33688
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesGanesh Samarthyam
 
OpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheConOpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheConos890
 
Lies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerLies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerGarth Gilmour
 
Converting Db Schema Into Uml Classes
Converting Db Schema Into Uml ClassesConverting Db Schema Into Uml Classes
Converting Db Schema Into Uml ClassesKaniska Mandal
 
Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic ComponentsMateusz Tymek
 
Magento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request FlowMagento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request FlowVrann Tulika
 
.settings.jsdtscope.settingsorg.eclipse.jdt.core.prefs.docx
.settings.jsdtscope.settingsorg.eclipse.jdt.core.prefs.docx.settings.jsdtscope.settingsorg.eclipse.jdt.core.prefs.docx
.settings.jsdtscope.settingsorg.eclipse.jdt.core.prefs.docxmercysuttle
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoinknight1128
 
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docxMorgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docxgilpinleeanna
 
Java final project of scientific calcultor
Java final project of scientific calcultorJava final project of scientific calcultor
Java final project of scientific calcultorMd. Eunus Ali Rupom
 

Similar to Assignment #2.classpathAssignment #2.project Assig.docx (20)

Android workshop
Android workshopAndroid workshop
Android workshop
 
Soundreader.classpathSoundreader.project Soundre.docx
Soundreader.classpathSoundreader.project  Soundre.docxSoundreader.classpathSoundreader.project  Soundre.docx
Soundreader.classpathSoundreader.project Soundre.docx
 
Java设置环境变量
Java设置环境变量Java设置环境变量
Java设置环境变量
 
C# 6.0 Preview
C# 6.0 PreviewC# 6.0 Preview
C# 6.0 Preview
 
JSUG - Tech Tips1 by Christoph Pickl
JSUG - Tech Tips1 by Christoph PicklJSUG - Tech Tips1 by Christoph Pickl
JSUG - Tech Tips1 by Christoph Pickl
 
Chapter 04 Exercise.classpathChapter 04 Exercise.project.docx
Chapter 04 Exercise.classpathChapter 04 Exercise.project.docxChapter 04 Exercise.classpathChapter 04 Exercise.project.docx
Chapter 04 Exercise.classpathChapter 04 Exercise.project.docx
 
Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02
 
Ten useful JavaScript tips & best practices
Ten useful JavaScript tips & best practicesTen useful JavaScript tips & best practices
Ten useful JavaScript tips & best practices
 
Ordering System IP2buildclasses.netbeans_automatic_buildO.docx
Ordering System IP2buildclasses.netbeans_automatic_buildO.docxOrdering System IP2buildclasses.netbeans_automatic_buildO.docx
Ordering System IP2buildclasses.netbeans_automatic_buildO.docx
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java Bytecodes
 
OpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheConOpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheCon
 
Curator intro
Curator introCurator intro
Curator intro
 
Lies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerLies Told By The Kotlin Compiler
Lies Told By The Kotlin Compiler
 
Converting Db Schema Into Uml Classes
Converting Db Schema Into Uml ClassesConverting Db Schema Into Uml Classes
Converting Db Schema Into Uml Classes
 
Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic Components
 
Magento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request FlowMagento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request Flow
 
.settings.jsdtscope.settingsorg.eclipse.jdt.core.prefs.docx
.settings.jsdtscope.settingsorg.eclipse.jdt.core.prefs.docx.settings.jsdtscope.settingsorg.eclipse.jdt.core.prefs.docx
.settings.jsdtscope.settingsorg.eclipse.jdt.core.prefs.docx
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docxMorgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
 
Java final project of scientific calcultor
Java final project of scientific calcultorJava final project of scientific calcultor
Java final project of scientific calcultor
 

More from fredharris32

A report writingAt least 5 pagesTitle pageExecutive Su.docx
A report writingAt least 5 pagesTitle pageExecutive Su.docxA report writingAt least 5 pagesTitle pageExecutive Su.docx
A report writingAt least 5 pagesTitle pageExecutive Su.docxfredharris32
 
A reflection of how your life has changedevolved as a result of the.docx
A reflection of how your life has changedevolved as a result of the.docxA reflection of how your life has changedevolved as a result of the.docx
A reflection of how your life has changedevolved as a result of the.docxfredharris32
 
A Princeton University study argues that the preferences of average.docx
A Princeton University study argues that the preferences of average.docxA Princeton University study argues that the preferences of average.docx
A Princeton University study argues that the preferences of average.docxfredharris32
 
A rapidly growing small firm does not have access to sufficient exte.docx
A rapidly growing small firm does not have access to sufficient exte.docxA rapidly growing small firm does not have access to sufficient exte.docx
A rapidly growing small firm does not have access to sufficient exte.docxfredharris32
 
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docxA psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docxfredharris32
 
A project to put on a major international sporting competition has t.docx
A project to put on a major international sporting competition has t.docxA project to put on a major international sporting competition has t.docx
A project to put on a major international sporting competition has t.docxfredharris32
 
A professional services company wants to globalize by offering s.docx
A professional services company wants to globalize by offering s.docxA professional services company wants to globalize by offering s.docx
A professional services company wants to globalize by offering s.docxfredharris32
 
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docxA presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docxfredharris32
 
a presentatiion on how the over dependence of IOT AI and robotics di.docx
a presentatiion on how the over dependence of IOT AI and robotics di.docxa presentatiion on how the over dependence of IOT AI and robotics di.docx
a presentatiion on how the over dependence of IOT AI and robotics di.docxfredharris32
 
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docxA P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docxfredharris32
 
A nursing care plan (NCP) is a formal process that includes .docx
A nursing care plan (NCP) is a formal process that includes .docxA nursing care plan (NCP) is a formal process that includes .docx
A nursing care plan (NCP) is a formal process that includes .docxfredharris32
 
A nurse educator is preparing an orientation on culture and the wo.docx
A nurse educator is preparing an orientation on culture and the wo.docxA nurse educator is preparing an orientation on culture and the wo.docx
A nurse educator is preparing an orientation on culture and the wo.docxfredharris32
 
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docxA NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docxfredharris32
 
A Look at the Marburg Fever OutbreaksThis week we will exami.docx
A Look at the Marburg Fever OutbreaksThis week we will exami.docxA Look at the Marburg Fever OutbreaksThis week we will exami.docx
A Look at the Marburg Fever OutbreaksThis week we will exami.docxfredharris32
 
A network consisting of M cities and M-1 roads connecting them is gi.docx
A network consisting of M cities and M-1 roads connecting them is gi.docxA network consisting of M cities and M-1 roads connecting them is gi.docx
A network consisting of M cities and M-1 roads connecting them is gi.docxfredharris32
 
A minimum 20-page (not including cover page, abstract, table of cont.docx
A minimum 20-page (not including cover page, abstract, table of cont.docxA minimum 20-page (not including cover page, abstract, table of cont.docx
A minimum 20-page (not including cover page, abstract, table of cont.docxfredharris32
 
A major component of being a teacher is the collaboration with t.docx
A major component of being a teacher is the collaboration with t.docxA major component of being a teacher is the collaboration with t.docx
A major component of being a teacher is the collaboration with t.docxfredharris32
 
a mad professor slips a secret tablet in your food that makes you gr.docx
a mad professor slips a secret tablet in your food that makes you gr.docxa mad professor slips a secret tablet in your food that makes you gr.docx
a mad professor slips a secret tablet in your food that makes you gr.docxfredharris32
 
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docxA New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docxfredharris32
 
A N A M E R I C A N H I S T O R YG I V E M EL I B.docx
A N  A M E R I C A N  H I S T O R YG I V E  M EL I B.docxA N  A M E R I C A N  H I S T O R YG I V E  M EL I B.docx
A N A M E R I C A N H I S T O R YG I V E M EL I B.docxfredharris32
 

More from fredharris32 (20)

A report writingAt least 5 pagesTitle pageExecutive Su.docx
A report writingAt least 5 pagesTitle pageExecutive Su.docxA report writingAt least 5 pagesTitle pageExecutive Su.docx
A report writingAt least 5 pagesTitle pageExecutive Su.docx
 
A reflection of how your life has changedevolved as a result of the.docx
A reflection of how your life has changedevolved as a result of the.docxA reflection of how your life has changedevolved as a result of the.docx
A reflection of how your life has changedevolved as a result of the.docx
 
A Princeton University study argues that the preferences of average.docx
A Princeton University study argues that the preferences of average.docxA Princeton University study argues that the preferences of average.docx
A Princeton University study argues that the preferences of average.docx
 
A rapidly growing small firm does not have access to sufficient exte.docx
A rapidly growing small firm does not have access to sufficient exte.docxA rapidly growing small firm does not have access to sufficient exte.docx
A rapidly growing small firm does not have access to sufficient exte.docx
 
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docxA psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
 
A project to put on a major international sporting competition has t.docx
A project to put on a major international sporting competition has t.docxA project to put on a major international sporting competition has t.docx
A project to put on a major international sporting competition has t.docx
 
A professional services company wants to globalize by offering s.docx
A professional services company wants to globalize by offering s.docxA professional services company wants to globalize by offering s.docx
A professional services company wants to globalize by offering s.docx
 
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docxA presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
 
a presentatiion on how the over dependence of IOT AI and robotics di.docx
a presentatiion on how the over dependence of IOT AI and robotics di.docxa presentatiion on how the over dependence of IOT AI and robotics di.docx
a presentatiion on how the over dependence of IOT AI and robotics di.docx
 
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docxA P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
 
A nursing care plan (NCP) is a formal process that includes .docx
A nursing care plan (NCP) is a formal process that includes .docxA nursing care plan (NCP) is a formal process that includes .docx
A nursing care plan (NCP) is a formal process that includes .docx
 
A nurse educator is preparing an orientation on culture and the wo.docx
A nurse educator is preparing an orientation on culture and the wo.docxA nurse educator is preparing an orientation on culture and the wo.docx
A nurse educator is preparing an orientation on culture and the wo.docx
 
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docxA NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
 
A Look at the Marburg Fever OutbreaksThis week we will exami.docx
A Look at the Marburg Fever OutbreaksThis week we will exami.docxA Look at the Marburg Fever OutbreaksThis week we will exami.docx
A Look at the Marburg Fever OutbreaksThis week we will exami.docx
 
A network consisting of M cities and M-1 roads connecting them is gi.docx
A network consisting of M cities and M-1 roads connecting them is gi.docxA network consisting of M cities and M-1 roads connecting them is gi.docx
A network consisting of M cities and M-1 roads connecting them is gi.docx
 
A minimum 20-page (not including cover page, abstract, table of cont.docx
A minimum 20-page (not including cover page, abstract, table of cont.docxA minimum 20-page (not including cover page, abstract, table of cont.docx
A minimum 20-page (not including cover page, abstract, table of cont.docx
 
A major component of being a teacher is the collaboration with t.docx
A major component of being a teacher is the collaboration with t.docxA major component of being a teacher is the collaboration with t.docx
A major component of being a teacher is the collaboration with t.docx
 
a mad professor slips a secret tablet in your food that makes you gr.docx
a mad professor slips a secret tablet in your food that makes you gr.docxa mad professor slips a secret tablet in your food that makes you gr.docx
a mad professor slips a secret tablet in your food that makes you gr.docx
 
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docxA New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
 
A N A M E R I C A N H I S T O R YG I V E M EL I B.docx
A N  A M E R I C A N  H I S T O R YG I V E  M EL I B.docxA N  A M E R I C A N  H I S T O R YG I V E  M EL I B.docx
A N A M E R I C A N H I S T O R YG I V E M EL I B.docx
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

Assignment #2.classpathAssignment #2.project Assig.docx

  • 1. Assignment #2/.classpath Assignment #2/.project Assignment #2 org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature Assignment #2/.settings/org.eclipse.jdt.core.prefs eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enable d org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.7
  • 2. org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.7 Assignment #2/Assignment #2.javaAssignment #2/Assignment #2.javapackage assignment2; import java.util.Date; publicclassTestCells{ publicstaticvoid main(String[] args){ Customer customer =newCustomer("ziyad","724-506- 3587",100.00,00.50,300,200); Invoice invoice=newInvoice(customer); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65));
  • 3. invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.printInvoice(); } } Assignment #2/bin/assignment2/Call.classpackage assignment2; publicsynchronizedclass Call { private String namber; private java.util.Date date; private int minute; private boolean offPeak; public void Call(String, java.util.Date, int); public String getNamber(); public void setNamber(String); public java.util.Date getDate(); public void setDate(java.util.Date); public int getMinute(); public void setMinute(int); public boolean getOffPeak(); } Assignment #2/bin/assignment2/Customer.classpackage assignment2; publicsynchronizedclass Customer { private String name; private String number;
  • 4. private double planPrice; private double rateForExtraMinutes; private int peakMinutesIncluded; private int offpeakMinutesIncluded; public void Customer(String, String, double, double, int, int); public String getName(); public void setName(String); public String getnumber(); public void setNumber(String); public double getPlanPrice(); public void setPlanPrice(double); public double getRateForExtraMinutes(); public void setRateForExtraMinutes(double); public int getPeakMinutesIncluded(); public void setPeakMinutesIncluded(int); public int getOffpeakMinutesIncluded(); public void setOffpeakMinutesIncluded(int); } Assignment #2/bin/assignment2/Invoice.classpackage assignment2; publicsynchronizedclass Invoice { private Customer customer; private Call[] calls; private int noCalls; private double amountDue; private int offPeakMinutesUsed; private int peakMinutesUsed; public void Invoice(Customer); public void addCall(Call); public int getNoCalls(); public Call getCall(int); private int calcPeakMinutesUsed(); private int calcOffPeakMinutesUsed(); public void printInvoice();
  • 5. } Assignment #2/bin/assignment2/TestCells.classpackage assignment2; publicsynchronizedclass TestCells { public void TestCells(); publicstatic void main(String[]); } Assignment #2/src/assignment2/Call.javaAssignment #2/src/assignment2/Call.javapackage assignment2; import java.util.Date; publicclassCall{ privateString namber; privateDate date; privateint minute; privateboolean offPeak; publicCall(String namber,Date date,int minute){ super(); this.namber = namber; this.date = date; this.minute = minute; this.offPeak= date.getHours()>=18; } publicString getNamber(){ return namber; } publicvoid setNamber(String namber){ this.namber = namber;
  • 6. } publicDate getDate(){ return date; } publicvoid setDate(Date date){ this.date = date; } publicint getMinute(){ return minute; } publicvoid setMinute(int minute){ this.minute = minute; } publicboolean getOffPeak(){ return offPeak; } } Assignment #2/src/assignment2/Customer.javaAssignment #2/src/assignment2/Customer.javapackage assignment2; publicclassCustomer{ privateString name; privateString number; privatedouble planPrice; privatedouble rateForExtraMinutes; privateint peakMinutesIncluded; privateint offpeakMinutesIncluded;
  • 7. publicCustomer(String name,String number,double planPrice,do uble rateForExtraMinutes, int peakMinutesIncluded,int offpeakMinutesIncluded){ super(); this.name = name; this.number = number; this.planPrice = planPrice; this.rateForExtraMinutes = rateForExtraMinutes; this.peakMinutesIncluded = peakMinutesIncluded; this.offpeakMinutesIncluded = offpeakMinutesIncluded; } publicString getName(){ return name; } publicvoid setName(String name){ this.name = name; } publicString getnumber(){ return number; } publicvoid setNumber(String number){ this.number = number; } publicdouble getPlanPrice(){ return planPrice; } publicvoid setPlanPrice(double planPrice){ this.planPrice = planPrice; }
  • 8. publicdouble getRateForExtraMinutes(){ return rateForExtraMinutes; } publicvoid setRateForExtraMinutes(double rateForExtraMinutes ){ this.rateForExtraMinutes = rateForExtraMinutes; } publicint getPeakMinutesIncluded(){ return peakMinutesIncluded; } publicvoid setPeakMinutesIncluded(int peakMinutesIncluded){ this.peakMinutesIncluded = peakMinutesIncluded; } publicint getOffpeakMinutesIncluded(){ return offpeakMinutesIncluded; } publicvoid setOffpeakMinutesIncluded(int offpeakMinutesInclu ded){ this.offpeakMinutesIncluded = offpeakMinutesIncluded; } } Assignment #2/src/assignment2/Invoice.javaAssignment #2/src/assignment2/Invoice.javapackage assignment2; publicclassInvoice{ privateCustomer customer;
  • 9. privateCall[] calls =newCall[10]; privateint noCalls =0; privatedouble amountDue; privateint offPeakMinutesUsed; privateint peakMinutesUsed; publicInvoice(Customer customer){ this.customer = customer; } publicvoid addCall(Call call){ calls[noCalls++]= call; } publicint getNoCalls(){ return noCalls; } publicCall getCall(int n){ return calls[n]; } privateint calcPeakMinutesUsed(){ peakMinutesUsed =0; for(int n =0; n < noCalls; n++){ Call callT = getCall(n); if(callT.getDate().getHours()<18){ peakMinutesUsed = peakMinutesUsed+callT.getMinu te(); } } return peakMinutesUsed; } privateint calcOffPeakMinutesUsed(){ offPeakMinutesUsed =0;
  • 10. for(int n =0; n < noCalls; n++){ Call callT = calls[n]; if(callT.getDate().getHours()>=18){ offPeakMinutesUsed = offPeakMinutesUsed+callT.ge tMinute(); } } return offPeakMinutesUsed; } publicvoid printInvoice(){ peakMinutesUsed=calcPeakMinutesUsed (); offPeakMinutesUsed= calcOffPeakMinutesUsed(); amountDue = customer.getPlanPrice(); System.out.printf("CellsRUS Invoice Date%snn","Date here" ); System.out.printf("customer %s telepohne%snn", customer.get Name(), customer.getnumber()); System.out.printf(" plan Price $%4.2f Rate For Extra Minutes $ %2.2fnn", customer.getPlanPrice(), customer.getRateForExtra Minutes()); System.out.printf("Peak Minutes Inclued %d off Peak Minutes I nclued %dnn", customer.getPeakMinutesIncluded(), customer. getOffpeakMinutesIncluded()); System.out.printf("Peak Minutes Used %d off Peak Minutes Use d %dnn", peakMinutesUsed, offPeakMinutesUsed ); System.out.printf("amount due $%4.2fn", amountDue ); for(int n =0; n < noCalls; n++){ Call callT = calls[n]; System.out.printf(" %s %s %sn", callT.getNamber(), callT.getD ate(),callT.getMinute(),callT.getOffPeak()); } } }
  • 11. Assignment #2/src/assignment2/TestCells.javaAssignment #2/src/assignment2/TestCells.javapackage assignment2; import java.util.Date; publicclassTestCells{ publicstaticvoid main(String[] args){ Customer customer =newCustomer("ziyad","724-506- 3587",100.00,00.50,300,200); Invoice invoice=newInvoice(customer); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.printInvoice(); } }
  • 12. Assignment #2/TestCells.javaAssignment #2/TestCells.javapackage assignment2; import java.util.Date; publicclassTestCells{ publicstaticvoid main(String[] args){ Customer customer =newCustomer("ziyad","724-506- 3587",100.00,00.50,300,200); Invoice invoice=newInvoice(customer); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.addCall(newCall("809-324-8278",newDate(2007- 1900,6-1,9,18,10,56),65)); invoice.printInvoice(); } }
  • 13. For this report: • The number of columns is 60. • The content of the post/reply must be word wrapped. • A reply must have a left margin which is a 4 space indent from its parent post. • If needed, truncate the length of the subject line to the remaining width of a page. Likewise for the "by" line. • Note the "by" line lists only the member's first initial and last name. Write a test program to thoroughly test your class. You do not need to use the example above (if you do the dates will at least be different). However, make sure your example has: • At least 3 posts to the forum • One post to the forum has no replies • One post to the forum has at least 2 level of replies (a reply to a reply) • One post to the forum has at least 2 replies on the same level • For replies use a subject line the subject line to which it is a reply pre-pended with "Re: ". • Demonstrate that your word wrapping is working for at least to levels. • Print both a summary report and a detailed report • One forum is sufficient To assist in this assignment, a class called RDate is available on the T: cosc21 O. This class will generate simulation data where is instantiation of an RDate is 2 minutes to one hour later than
  • 14. the previous instantiation. Additional specification: • Use RDate for the date of the post and replies. Do not pass it in as an argument in the constructor. Instead create an new RDate instance inside the constructor. • In the forum defined an addPost method which takes as an argument a member, a subject line, and a content string (which could be very long). Have the method create an instance of a post and add it to the array. Return the instance of the post. (this will allow the test program to add replies to the replies) • In the post class provide an addReply method which takes as an argument a member and a content string. Have the method create an instance of a post and add it to the array. Use the current posts subject line to generate the subject line for the new post. Return the instance of the post. (this will allow the test program to add replies to the replies) • Inyour forum, have a private method that will print the first 5 lines of a report (these are the same between the two reports except for the second line). Call the method from the other two report methods to print the report header. • No print should appear after the 50th column. • Abide by good programming practices (e.g., naming conventions, javadoc, indentation,
  • 15. use of braces, etc.). A sample detail report would be: Assignment Discussion Forum Detail Report Owned by: David T Smith No Discussion: 3 Discussions o or blank by ~. Blue on Thurs, Feb 16 at 08:30pm --------------------------- When printing the time logs does it matter if we have a 0 or do you want a blank space in the overtime column? Re: 0 or blank by D. Smith on Thurs, Feb 16 at 07:21pm I will accept either printing 0 or printing a space when zero. Interesting question. How would I print space instead of O? Re: Re: 0 or blank by B. Blue Thurs, Feb 16 at 09:21pm To print a simple space or blank, just do a simple if statement to print one form or another. Re: Re: 0 or blank
  • 16. by J. Green Thurs, Feb 16 at 09:22pm Write a function to return 4 spaces when 0 or a String representation of the number using %4d Problems with formatting. by C. Hope on Mon, Feb 12 at 01:52pm I can't get normal hours to print. My code inside my print method: System. out .printf ("Normal Hours worked: %50d vn ? , timeLog.getNormalHours() ) ; Re: Problems with formatting. by D. Smith on Mon, Feb 13 at 07:52am Not sure what your problem is. The %50d looks odd. Should it be more like %5d? That is only 5 digits wide not 50. Reminder - javadoc and formatting by D. Smith on Tues, Feb 7 at 04:59pm Reminder, Make sure you have javadoc before the class declaration and before every public method. Make sure you Use good formatting. eose 210 -Object Oriented and GUI Programming Assignment 3 Problem Statement Bulletin boards/forums, such as the forums on moodle, provide a means for individuals to ask questions in the form of a post. Others may then post replies to
  • 17. the initial post, and/or to other replies. All communication in a forum is typically performed on-line and recorded. For this assignment it is desired to provide reports of all communication that has been recorded in a forum. Since the report is to be printed on paper that has a fix width, the text of a post needs to be printed in a word wrapped format. Furthermore, replies need to be printed with 4 space indentation to the parent post. Develop classes to represent forums, posts, and members. A forum is to have a short one line title to the forum, and the member owning the forum. Have the constructor for a member consists of ONE argument which is the member's full name (i.e., first name followed by middle initial and then last name). A post contains a subject line, content (which can be a very long string of text), the member creating the post, and the date/time of the post. In your forum class provide two print methods, one to print a summary of posts and the other to print the entire contents. A sample for the report produced by the summary of posts is as follows: Assignment Discussion Forum Summary Report Owned by: David T Smith No Discussions: 3 Discussions By #Rs On o or blank BTJ
  • 18. Problems with formatting. CJH Reminder - javadoc and format DTS 3 1 o 2/16 /15 08: 30pm 2/12/15 01: 52pm 2/07/15 04:59pm For this report: • The number of columns is 50. • The title for the forum is to be printed in the center of the page. • If needed, truncate the length of the subject line of a post to 30 characters. • The first By is the initials of the member making the post. • #Rs is the total number of replies in response to this post (includes nested replies) • The On is the date and time of the initial post. • This report does not show the replies themselves. / eose 210 -Object Oriented and GUI Programming Assignment 3 -...,-- -. - I "'-------__,." ~ The objectives of this exercise are to:
  • 19. 1) Gain further experience in the use of Eclipse IDE. 2) Gain further experience with control structures. 3) Gain an understanding of Strings within Java. 4) Develop and test a small Java program applying the concepts of objectives 2 and 3. 5) Practice good programming conventions. AFTER YOU HAVE COMPLETED: put all the files into a zip file named [your name]Assignment3.zip. Include all .class and .java files. Upload the zip file to Moodle. Print all source files and output produced by your test program. Tum- in all materials by the due date.