SlideShare a Scribd company logo
1 of 7
Download to read offline
import java.util.Arrays;
import java.util.List;
public class BursarOfficeService {
package edu.nku.csc364.bursar;
public enum ClassStatus {
SENIOR, JUNIOR, SOPHOMORE, FRESHMEN
}
package edu.nku.csc364.bursar;
public class Event {
EventType type;
T data;
public Event(EventType type) {
this(type, null);
}
public Event(EventType type, T data) {
this.type = type;
this.data = data;
}
public EventType getType() {
return type;
}
public T getData() {
return data;
}
}
public void receiveEvent(Event event) {
}
public List runReport() {
return Arrays.asList();
}
}
package edu.nku.csc364.bursar;
public enum EventType {
NEW_REQUEST, REQUEST_COMPLETED;
}
package edu.nku.csc364.bursar;
public class Student {
private String name;
private double gpa;
private ClassStatus status;
private int token;
public Student(String name, double gpa, ClassStatus status) {
this.name = name;
this.gpa = gpa;
this.status = status;
}
public Student(String name, double gpa, int token) {
this.name = name;
this.gpa = gpa;
this.token = token;
}
public String getName() {
return name;
}
public double getGpa() {
return gpa;
}
public ClassStatus getStatus() {
return status;
}
public int getToken() {
return token;
}
public String toString() {
return "{" + name + ", " + gpa + ", " + status + ", " + token + "}";
}
}
package edu.nku.csc364.bursar;
import org.junit.Before;
import org.junit.Test;
import java.util.List;
import static edu.nku.csc364.bursar.EventType.NEW_REQUEST;
import static edu.nku.csc364.bursar.EventType.REQUEST_COMPLETED;
import static org.assertj.core.api.Assertions.assertThat;
public class BursarOfficeServiceTest {
BursarOfficeService service;
public void setup() {
service = new BursarOfficeService();
}
public void happyPathExample() {
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("John", 3.75,
ClassStatus.SENIOR)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Mark", 3.8,
ClassStatus.FRESHMEN)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Shawn", 3.7,
ClassStatus.JUNIOR)));
service.receiveEvent(new Event<>(REQUEST_COMPLETED));
service.receiveEvent(new Event<>(REQUEST_COMPLETED));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Sam", 3.85,
ClassStatus.SENIOR)));
service.receiveEvent(new Event<>(REQUEST_COMPLETED));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Ashley", 3.9,
ClassStatus.SOPHOMORE)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Mary", 3.6,
ClassStatus.FRESHMEN)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Andrew", 3.95,
ClassStatus.JUNIOR)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Dan", 3.95,
ClassStatus.SENIOR)));
service.receiveEvent(new Event<>(REQUEST_COMPLETED));
List report = service.runReport();
assertThat(report).isNotEmpty();
assertThat(report).hasSize(4);
assertThat(report).containsSequence("Andrew", "Ashley", "Mark", "Mary");
}
}
java.lang.Object
java.util.AbstractCollection
java.util.AbstractQueue
java.util.PriorityQueue
public static void main(string args, argv[]){
BursarOfficeService service;
service=new BursarOfficeService();
}
Solution
import java.util.Arrays;
import java.util.List;
public class BursarOfficeService {
package edu.nku.csc364.bursar;
public enum ClassStatus {
SENIOR, JUNIOR, SOPHOMORE, FRESHMEN
}
package edu.nku.csc364.bursar;
public class Event {
EventType type;
T data;
public Event(EventType type) {
this(type, null);
}
public Event(EventType type, T data) {
this.type = type;
this.data = data;
}
public EventType getType() {
return type;
}
public T getData() {
return data;
}
}
public void receiveEvent(Event event) {
}
public List runReport() {
return Arrays.asList();
}
}
package edu.nku.csc364.bursar;
public enum EventType {
NEW_REQUEST, REQUEST_COMPLETED;
}
package edu.nku.csc364.bursar;
public class Student {
private String name;
private double gpa;
private ClassStatus status;
private int token;
public Student(String name, double gpa, ClassStatus status) {
this.name = name;
this.gpa = gpa;
this.status = status;
}
public Student(String name, double gpa, int token) {
this.name = name;
this.gpa = gpa;
this.token = token;
}
public String getName() {
return name;
}
public double getGpa() {
return gpa;
}
public ClassStatus getStatus() {
return status;
}
public int getToken() {
return token;
}
public String toString() {
return "{" + name + ", " + gpa + ", " + status + ", " + token + "}";
}
}
package edu.nku.csc364.bursar;
import org.junit.Before;
import org.junit.Test;
import java.util.List;
import static edu.nku.csc364.bursar.EventType.NEW_REQUEST;
import static edu.nku.csc364.bursar.EventType.REQUEST_COMPLETED;
import static org.assertj.core.api.Assertions.assertThat;
public class BursarOfficeServiceTest {
BursarOfficeService service;
public void setup() {
service = new BursarOfficeService();
}
public void happyPathExample() {
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("John", 3.75,
ClassStatus.SENIOR)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Mark", 3.8,
ClassStatus.FRESHMEN)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Shawn", 3.7,
ClassStatus.JUNIOR)));
service.receiveEvent(new Event<>(REQUEST_COMPLETED));
service.receiveEvent(new Event<>(REQUEST_COMPLETED));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Sam", 3.85,
ClassStatus.SENIOR)));
service.receiveEvent(new Event<>(REQUEST_COMPLETED));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Ashley", 3.9,
ClassStatus.SOPHOMORE)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Mary", 3.6,
ClassStatus.FRESHMEN)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Andrew", 3.95,
ClassStatus.JUNIOR)));
service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Dan", 3.95,
ClassStatus.SENIOR)));
service.receiveEvent(new Event<>(REQUEST_COMPLETED));
List report = service.runReport();
assertThat(report).isNotEmpty();
assertThat(report).hasSize(4);
assertThat(report).containsSequence("Andrew", "Ashley", "Mark", "Mary");
}
}
java.lang.Object
java.util.AbstractCollection
java.util.AbstractQueue
java.util.PriorityQueue
public static void main(string args, argv[]){
BursarOfficeService service;
service=new BursarOfficeService();
}

More Related Content

Similar to import java.util.Arrays;import java.util.List;public class Bursa.pdf

Listing.javaimport java.util.Scanner;public class Listing {   .pdf
Listing.javaimport java.util.Scanner;public class Listing {   .pdfListing.javaimport java.util.Scanner;public class Listing {   .pdf
Listing.javaimport java.util.Scanner;public class Listing {   .pdfAnkitchhabra28
 
package patienttest;import java.util.Comparator; import java..pdf
 package patienttest;import java.util.Comparator; import java..pdf package patienttest;import java.util.Comparator; import java..pdf
package patienttest;import java.util.Comparator; import java..pdfannucommunication1
 
Hello. Im currently working on the last section to my assignment a.pdf
Hello. Im currently working on the last section to my assignment a.pdfHello. Im currently working on the last section to my assignment a.pdf
Hello. Im currently working on the last section to my assignment a.pdfirshadkumar3
 
Can someone help me with this code When I run it, it stops after th.pdf
Can someone help me with this code When I run it, it stops after th.pdfCan someone help me with this code When I run it, it stops after th.pdf
Can someone help me with this code When I run it, it stops after th.pdfAmansupan
 
Here is how the code works1. Patient.java is an Abstract Class whi.pdf
Here is how the code works1. Patient.java is an Abstract Class whi.pdfHere is how the code works1. Patient.java is an Abstract Class whi.pdf
Here is how the code works1. Patient.java is an Abstract Class whi.pdfarasanlethers
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEDarwin Durand
 
Scala - fra newbie til ninja på en time
Scala - fra newbie til ninja på en timeScala - fra newbie til ninja på en time
Scala - fra newbie til ninja på en timekarianneberg
 
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdfCreate a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdflakshmijewellery
 
Create a class named Student that has the following member variables.pdf
Create a class named Student that has the following member variables.pdfCreate a class named Student that has the following member variables.pdf
Create a class named Student that has the following member variables.pdfarrowvisionoptics
 
Creating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdfCreating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdfShaiAlmog1
 
Modul Praktek Java OOP
Modul Praktek Java OOP Modul Praktek Java OOP
Modul Praktek Java OOP Zaenal Arifin
 
Tested on EclipseBoth class should be in same package.pdf
Tested on EclipseBoth class should be in same package.pdfTested on EclipseBoth class should be in same package.pdf
Tested on EclipseBoth class should be in same package.pdfanupamagarud8
 
3. Объекты, классы и пакеты в Java
3. Объекты, классы и пакеты в Java3. Объекты, классы и пакеты в Java
3. Объекты, классы и пакеты в JavaDEVTYPE
 

Similar to import java.util.Arrays;import java.util.List;public class Bursa.pdf (20)

Listing.javaimport java.util.Scanner;public class Listing {   .pdf
Listing.javaimport java.util.Scanner;public class Listing {   .pdfListing.javaimport java.util.Scanner;public class Listing {   .pdf
Listing.javaimport java.util.Scanner;public class Listing {   .pdf
 
Design in the small
Design in the smallDesign in the small
Design in the small
 
package patienttest;import java.util.Comparator; import java..pdf
 package patienttest;import java.util.Comparator; import java..pdf package patienttest;import java.util.Comparator; import java..pdf
package patienttest;import java.util.Comparator; import java..pdf
 
Rizal's Life
Rizal's Life Rizal's Life
Rizal's Life
 
Hello. Im currently working on the last section to my assignment a.pdf
Hello. Im currently working on the last section to my assignment a.pdfHello. Im currently working on the last section to my assignment a.pdf
Hello. Im currently working on the last section to my assignment a.pdf
 
Can someone help me with this code When I run it, it stops after th.pdf
Can someone help me with this code When I run it, it stops after th.pdfCan someone help me with this code When I run it, it stops after th.pdf
Can someone help me with this code When I run it, it stops after th.pdf
 
Java2
Java2Java2
Java2
 
Here is how the code works1. Patient.java is an Abstract Class whi.pdf
Here is how the code works1. Patient.java is an Abstract Class whi.pdfHere is how the code works1. Patient.java is an Abstract Class whi.pdf
Here is how the code works1. Patient.java is an Abstract Class whi.pdf
 
Class 3 2ciclo
Class 3 2cicloClass 3 2ciclo
Class 3 2ciclo
 
Class 3 2ciclo
Class 3 2cicloClass 3 2ciclo
Class 3 2ciclo
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
 
Scala - fra newbie til ninja på en time
Scala - fra newbie til ninja på en timeScala - fra newbie til ninja på en time
Scala - fra newbie til ninja på en time
 
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdfCreate a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
 
Watcher
WatcherWatcher
Watcher
 
Create a class named Student that has the following member variables.pdf
Create a class named Student that has the following member variables.pdfCreate a class named Student that has the following member variables.pdf
Create a class named Student that has the following member variables.pdf
 
Event recvr ss
Event recvr ssEvent recvr ss
Event recvr ss
 
Creating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdfCreating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdf
 
Modul Praktek Java OOP
Modul Praktek Java OOP Modul Praktek Java OOP
Modul Praktek Java OOP
 
Tested on EclipseBoth class should be in same package.pdf
Tested on EclipseBoth class should be in same package.pdfTested on EclipseBoth class should be in same package.pdf
Tested on EclipseBoth class should be in same package.pdf
 
3. Объекты, классы и пакеты в Java
3. Объекты, классы и пакеты в Java3. Объекты, классы и пакеты в Java
3. Объекты, классы и пакеты в Java
 

More from arpowersarps

Ans. 1. Most of the proteins meant to be translocated from cytoplasm.pdf
Ans. 1. Most of the proteins meant to be translocated from cytoplasm.pdfAns. 1. Most of the proteins meant to be translocated from cytoplasm.pdf
Ans. 1. Most of the proteins meant to be translocated from cytoplasm.pdfarpowersarps
 
A. Yes. Spore B and C shows the presence of recombination.B. Yes. .pdf
A. Yes. Spore B and C shows the presence of recombination.B. Yes. .pdfA. Yes. Spore B and C shows the presence of recombination.B. Yes. .pdf
A. Yes. Spore B and C shows the presence of recombination.B. Yes. .pdfarpowersarps
 
4.1 Introduction 145• In this section, we first take a gander at a.pdf
4.1 Introduction 145• In this section, we first take a gander at a.pdf4.1 Introduction 145• In this section, we first take a gander at a.pdf
4.1 Introduction 145• In this section, we first take a gander at a.pdfarpowersarps
 
2. Pocket Mice or the Rock pocket Mice is among the 19 species of th.pdf
2. Pocket Mice or the Rock pocket Mice is among the 19 species of th.pdf2. Pocket Mice or the Rock pocket Mice is among the 19 species of th.pdf
2. Pocket Mice or the Rock pocket Mice is among the 19 species of th.pdfarpowersarps
 
1 Ans BBarr Body is commonly found in the Somatic cells of a femal.pdf
1 Ans BBarr Body is commonly found in the Somatic cells of a femal.pdf1 Ans BBarr Body is commonly found in the Somatic cells of a femal.pdf
1 Ans BBarr Body is commonly found in the Somatic cells of a femal.pdfarpowersarps
 
sodium benzoate and ethly 4-aminobenzoate hydroch.pdf
                     sodium benzoate and ethly 4-aminobenzoate hydroch.pdf                     sodium benzoate and ethly 4-aminobenzoate hydroch.pdf
sodium benzoate and ethly 4-aminobenzoate hydroch.pdfarpowersarps
 
Mind-body interaction has a central place in our .pdf
                     Mind-body interaction has a central place in our .pdf                     Mind-body interaction has a central place in our .pdf
Mind-body interaction has a central place in our .pdfarpowersarps
 
Answer The affinity for oxygen will be lowered .pdf
                     Answer  The affinity for oxygen will be lowered .pdf                     Answer  The affinity for oxygen will be lowered .pdf
Answer The affinity for oxygen will be lowered .pdfarpowersarps
 
   Oxidation takes place at Anode   Reduction takes place at Anode.pdf
   Oxidation takes place at Anode   Reduction takes place at Anode.pdf   Oxidation takes place at Anode   Reduction takes place at Anode.pdf
   Oxidation takes place at Anode   Reduction takes place at Anode.pdfarpowersarps
 
The high electrical and thermal conductivities of.pdf
                     The high electrical and thermal conductivities of.pdf                     The high electrical and thermal conductivities of.pdf
The high electrical and thermal conductivities of.pdfarpowersarps
 
What various stakeholder groups did oil giant BP have to repsond to .pdf
What various stakeholder groups did oil giant BP have to repsond to .pdfWhat various stakeholder groups did oil giant BP have to repsond to .pdf
What various stakeholder groups did oil giant BP have to repsond to .pdfarpowersarps
 
trueTransport Layer Security ensures that emails are encrypted bet.pdf
trueTransport Layer Security ensures that emails are encrypted bet.pdftrueTransport Layer Security ensures that emails are encrypted bet.pdf
trueTransport Layer Security ensures that emails are encrypted bet.pdfarpowersarps
 
The valueof annual interest payments (without paying down the debt) .pdf
The valueof annual interest payments (without paying down the debt) .pdfThe valueof annual interest payments (without paying down the debt) .pdf
The valueof annual interest payments (without paying down the debt) .pdfarpowersarps
 
The statue of liberty is 140 years old.The construction of the sta.pdf
The statue of liberty is 140 years old.The construction of the sta.pdfThe statue of liberty is 140 years old.The construction of the sta.pdf
The statue of liberty is 140 years old.The construction of the sta.pdfarpowersarps
 
The patient is probably suffering with Bacteremia infections due to .pdf
The patient is probably suffering with Bacteremia infections due to .pdfThe patient is probably suffering with Bacteremia infections due to .pdf
The patient is probably suffering with Bacteremia infections due to .pdfarpowersarps
 
The equilibrium dissociation of the weak acid can berepresented as.pdf
The equilibrium dissociation of the weak acid can berepresented as.pdfThe equilibrium dissociation of the weak acid can berepresented as.pdf
The equilibrium dissociation of the weak acid can berepresented as.pdfarpowersarps
 
The answer is Transverse foramina.Cervical vertebrae can usually .pdf
The answer is Transverse foramina.Cervical vertebrae can usually .pdfThe answer is Transverse foramina.Cervical vertebrae can usually .pdf
The answer is Transverse foramina.Cervical vertebrae can usually .pdfarpowersarps
 
Solution.ECONOMIC SUBSTANCE refers to the application of income ta.pdf
Solution.ECONOMIC SUBSTANCE refers to the application of income ta.pdfSolution.ECONOMIC SUBSTANCE refers to the application of income ta.pdf
Solution.ECONOMIC SUBSTANCE refers to the application of income ta.pdfarpowersarps
 
Ques-7Chemokine receptor type 5 is main receptor occupied by macr.pdf
Ques-7Chemokine receptor type 5 is main receptor occupied by macr.pdfQues-7Chemokine receptor type 5 is main receptor occupied by macr.pdf
Ques-7Chemokine receptor type 5 is main receptor occupied by macr.pdfarpowersarps
 
Mexico expected the settlers to become Mexicans, but they provided n.pdf
Mexico expected the settlers to become Mexicans, but they provided n.pdfMexico expected the settlers to become Mexicans, but they provided n.pdf
Mexico expected the settlers to become Mexicans, but they provided n.pdfarpowersarps
 

More from arpowersarps (20)

Ans. 1. Most of the proteins meant to be translocated from cytoplasm.pdf
Ans. 1. Most of the proteins meant to be translocated from cytoplasm.pdfAns. 1. Most of the proteins meant to be translocated from cytoplasm.pdf
Ans. 1. Most of the proteins meant to be translocated from cytoplasm.pdf
 
A. Yes. Spore B and C shows the presence of recombination.B. Yes. .pdf
A. Yes. Spore B and C shows the presence of recombination.B. Yes. .pdfA. Yes. Spore B and C shows the presence of recombination.B. Yes. .pdf
A. Yes. Spore B and C shows the presence of recombination.B. Yes. .pdf
 
4.1 Introduction 145• In this section, we first take a gander at a.pdf
4.1 Introduction 145• In this section, we first take a gander at a.pdf4.1 Introduction 145• In this section, we first take a gander at a.pdf
4.1 Introduction 145• In this section, we first take a gander at a.pdf
 
2. Pocket Mice or the Rock pocket Mice is among the 19 species of th.pdf
2. Pocket Mice or the Rock pocket Mice is among the 19 species of th.pdf2. Pocket Mice or the Rock pocket Mice is among the 19 species of th.pdf
2. Pocket Mice or the Rock pocket Mice is among the 19 species of th.pdf
 
1 Ans BBarr Body is commonly found in the Somatic cells of a femal.pdf
1 Ans BBarr Body is commonly found in the Somatic cells of a femal.pdf1 Ans BBarr Body is commonly found in the Somatic cells of a femal.pdf
1 Ans BBarr Body is commonly found in the Somatic cells of a femal.pdf
 
sodium benzoate and ethly 4-aminobenzoate hydroch.pdf
                     sodium benzoate and ethly 4-aminobenzoate hydroch.pdf                     sodium benzoate and ethly 4-aminobenzoate hydroch.pdf
sodium benzoate and ethly 4-aminobenzoate hydroch.pdf
 
Mind-body interaction has a central place in our .pdf
                     Mind-body interaction has a central place in our .pdf                     Mind-body interaction has a central place in our .pdf
Mind-body interaction has a central place in our .pdf
 
Answer The affinity for oxygen will be lowered .pdf
                     Answer  The affinity for oxygen will be lowered .pdf                     Answer  The affinity for oxygen will be lowered .pdf
Answer The affinity for oxygen will be lowered .pdf
 
   Oxidation takes place at Anode   Reduction takes place at Anode.pdf
   Oxidation takes place at Anode   Reduction takes place at Anode.pdf   Oxidation takes place at Anode   Reduction takes place at Anode.pdf
   Oxidation takes place at Anode   Reduction takes place at Anode.pdf
 
The high electrical and thermal conductivities of.pdf
                     The high electrical and thermal conductivities of.pdf                     The high electrical and thermal conductivities of.pdf
The high electrical and thermal conductivities of.pdf
 
What various stakeholder groups did oil giant BP have to repsond to .pdf
What various stakeholder groups did oil giant BP have to repsond to .pdfWhat various stakeholder groups did oil giant BP have to repsond to .pdf
What various stakeholder groups did oil giant BP have to repsond to .pdf
 
trueTransport Layer Security ensures that emails are encrypted bet.pdf
trueTransport Layer Security ensures that emails are encrypted bet.pdftrueTransport Layer Security ensures that emails are encrypted bet.pdf
trueTransport Layer Security ensures that emails are encrypted bet.pdf
 
The valueof annual interest payments (without paying down the debt) .pdf
The valueof annual interest payments (without paying down the debt) .pdfThe valueof annual interest payments (without paying down the debt) .pdf
The valueof annual interest payments (without paying down the debt) .pdf
 
The statue of liberty is 140 years old.The construction of the sta.pdf
The statue of liberty is 140 years old.The construction of the sta.pdfThe statue of liberty is 140 years old.The construction of the sta.pdf
The statue of liberty is 140 years old.The construction of the sta.pdf
 
The patient is probably suffering with Bacteremia infections due to .pdf
The patient is probably suffering with Bacteremia infections due to .pdfThe patient is probably suffering with Bacteremia infections due to .pdf
The patient is probably suffering with Bacteremia infections due to .pdf
 
The equilibrium dissociation of the weak acid can berepresented as.pdf
The equilibrium dissociation of the weak acid can berepresented as.pdfThe equilibrium dissociation of the weak acid can berepresented as.pdf
The equilibrium dissociation of the weak acid can berepresented as.pdf
 
The answer is Transverse foramina.Cervical vertebrae can usually .pdf
The answer is Transverse foramina.Cervical vertebrae can usually .pdfThe answer is Transverse foramina.Cervical vertebrae can usually .pdf
The answer is Transverse foramina.Cervical vertebrae can usually .pdf
 
Solution.ECONOMIC SUBSTANCE refers to the application of income ta.pdf
Solution.ECONOMIC SUBSTANCE refers to the application of income ta.pdfSolution.ECONOMIC SUBSTANCE refers to the application of income ta.pdf
Solution.ECONOMIC SUBSTANCE refers to the application of income ta.pdf
 
Ques-7Chemokine receptor type 5 is main receptor occupied by macr.pdf
Ques-7Chemokine receptor type 5 is main receptor occupied by macr.pdfQues-7Chemokine receptor type 5 is main receptor occupied by macr.pdf
Ques-7Chemokine receptor type 5 is main receptor occupied by macr.pdf
 
Mexico expected the settlers to become Mexicans, but they provided n.pdf
Mexico expected the settlers to become Mexicans, but they provided n.pdfMexico expected the settlers to become Mexicans, but they provided n.pdf
Mexico expected the settlers to become Mexicans, but they provided n.pdf
 

Recently uploaded

Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdfRich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdfJerry Chew
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 

Recently uploaded (20)

Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdfRich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 

import java.util.Arrays;import java.util.List;public class Bursa.pdf

  • 1. import java.util.Arrays; import java.util.List; public class BursarOfficeService { package edu.nku.csc364.bursar; public enum ClassStatus { SENIOR, JUNIOR, SOPHOMORE, FRESHMEN } package edu.nku.csc364.bursar; public class Event { EventType type; T data; public Event(EventType type) { this(type, null); } public Event(EventType type, T data) { this.type = type; this.data = data; } public EventType getType() { return type; } public T getData() { return data; } } public void receiveEvent(Event event) { } public List runReport() { return Arrays.asList(); } } package edu.nku.csc364.bursar; public enum EventType { NEW_REQUEST, REQUEST_COMPLETED; }
  • 2. package edu.nku.csc364.bursar; public class Student { private String name; private double gpa; private ClassStatus status; private int token; public Student(String name, double gpa, ClassStatus status) { this.name = name; this.gpa = gpa; this.status = status; } public Student(String name, double gpa, int token) { this.name = name; this.gpa = gpa; this.token = token; } public String getName() { return name; } public double getGpa() { return gpa; } public ClassStatus getStatus() { return status; } public int getToken() { return token; } public String toString() { return "{" + name + ", " + gpa + ", " + status + ", " + token + "}"; } } package edu.nku.csc364.bursar; import org.junit.Before; import org.junit.Test; import java.util.List;
  • 3. import static edu.nku.csc364.bursar.EventType.NEW_REQUEST; import static edu.nku.csc364.bursar.EventType.REQUEST_COMPLETED; import static org.assertj.core.api.Assertions.assertThat; public class BursarOfficeServiceTest { BursarOfficeService service; public void setup() { service = new BursarOfficeService(); } public void happyPathExample() { service.receiveEvent(new Event<>(NEW_REQUEST, new Student("John", 3.75, ClassStatus.SENIOR))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Mark", 3.8, ClassStatus.FRESHMEN))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Shawn", 3.7, ClassStatus.JUNIOR))); service.receiveEvent(new Event<>(REQUEST_COMPLETED)); service.receiveEvent(new Event<>(REQUEST_COMPLETED)); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Sam", 3.85, ClassStatus.SENIOR))); service.receiveEvent(new Event<>(REQUEST_COMPLETED)); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Ashley", 3.9, ClassStatus.SOPHOMORE))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Mary", 3.6, ClassStatus.FRESHMEN))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Andrew", 3.95, ClassStatus.JUNIOR))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Dan", 3.95, ClassStatus.SENIOR))); service.receiveEvent(new Event<>(REQUEST_COMPLETED)); List report = service.runReport(); assertThat(report).isNotEmpty(); assertThat(report).hasSize(4); assertThat(report).containsSequence("Andrew", "Ashley", "Mark", "Mary"); } } java.lang.Object
  • 4. java.util.AbstractCollection java.util.AbstractQueue java.util.PriorityQueue public static void main(string args, argv[]){ BursarOfficeService service; service=new BursarOfficeService(); } Solution import java.util.Arrays; import java.util.List; public class BursarOfficeService { package edu.nku.csc364.bursar; public enum ClassStatus { SENIOR, JUNIOR, SOPHOMORE, FRESHMEN } package edu.nku.csc364.bursar; public class Event { EventType type; T data; public Event(EventType type) { this(type, null); } public Event(EventType type, T data) { this.type = type; this.data = data; } public EventType getType() { return type; } public T getData() { return data; } } public void receiveEvent(Event event) {
  • 5. } public List runReport() { return Arrays.asList(); } } package edu.nku.csc364.bursar; public enum EventType { NEW_REQUEST, REQUEST_COMPLETED; } package edu.nku.csc364.bursar; public class Student { private String name; private double gpa; private ClassStatus status; private int token; public Student(String name, double gpa, ClassStatus status) { this.name = name; this.gpa = gpa; this.status = status; } public Student(String name, double gpa, int token) { this.name = name; this.gpa = gpa; this.token = token; } public String getName() { return name; } public double getGpa() { return gpa; } public ClassStatus getStatus() { return status; } public int getToken() { return token;
  • 6. } public String toString() { return "{" + name + ", " + gpa + ", " + status + ", " + token + "}"; } } package edu.nku.csc364.bursar; import org.junit.Before; import org.junit.Test; import java.util.List; import static edu.nku.csc364.bursar.EventType.NEW_REQUEST; import static edu.nku.csc364.bursar.EventType.REQUEST_COMPLETED; import static org.assertj.core.api.Assertions.assertThat; public class BursarOfficeServiceTest { BursarOfficeService service; public void setup() { service = new BursarOfficeService(); } public void happyPathExample() { service.receiveEvent(new Event<>(NEW_REQUEST, new Student("John", 3.75, ClassStatus.SENIOR))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Mark", 3.8, ClassStatus.FRESHMEN))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Shawn", 3.7, ClassStatus.JUNIOR))); service.receiveEvent(new Event<>(REQUEST_COMPLETED)); service.receiveEvent(new Event<>(REQUEST_COMPLETED)); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Sam", 3.85, ClassStatus.SENIOR))); service.receiveEvent(new Event<>(REQUEST_COMPLETED)); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Ashley", 3.9, ClassStatus.SOPHOMORE))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Mary", 3.6, ClassStatus.FRESHMEN))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Andrew", 3.95, ClassStatus.JUNIOR))); service.receiveEvent(new Event<>(NEW_REQUEST, new Student("Dan", 3.95,
  • 7. ClassStatus.SENIOR))); service.receiveEvent(new Event<>(REQUEST_COMPLETED)); List report = service.runReport(); assertThat(report).isNotEmpty(); assertThat(report).hasSize(4); assertThat(report).containsSequence("Andrew", "Ashley", "Mark", "Mary"); } } java.lang.Object java.util.AbstractCollection java.util.AbstractQueue java.util.PriorityQueue public static void main(string args, argv[]){ BursarOfficeService service; service=new BursarOfficeService(); }