fbpx

JAVA Programming | Online Assignment Help

READ ALL SPECIFICATIONS. You only need to create one Java program for this assignment using Eclipse.

Don't use plagiarized sources. Get Your Assignment on
JAVA Programming | Online Assignment Help
Just from $13/Page
Order Now

Overview

There are two main parts to this assignment.

1. Write a project and package that contains definitions for the Pet class and the Procedure class (see below for specifications).

2. Write a project and package that unit tests the Pet and Procedure classes. You will have to import the package that has the definitions of the Pet and Procedure classes.

Part 1 – Class Specifications

Class – Pet

Store in project/package: <your last name>.bcs345.hwk.vet.business

Member Variables (all private)

Variable Data Type Description
Name String Contains the name of the pet.
Species String Contains the pet’s species.
Gender String Contains the pet’s gender.

Member Method Signatures and Descirptions (all public)

Signature Description
Pet() Default constructor. Sets the values of each member variable to a default value.
Pet(String name, String Species, String gender) Constructor. Sets the values of each member variable to the corresponding parameter values.
Get/Set methods Write get/set methods for all member variables.
void Read(Scanner s) Read the contents of all member variables from the given instance of Scanner. Assume the following:

1. Scanner is already open.

2. Member variable values are on separate lines.

void Write(PrintStream ps) Write the contents of all member variables to the given instance of PrintStream. Assume the PrintStream is already open and ready to use. Data should be written on to separate lines. DO NOT ADD ANY DESCRIPTIVE TEXT IN THE OUTPUT. JUST PRINT THE VALUES.

IMPORTANT – Whatever data is written out should be readable by the Read method of this class. If descriptive text is added then Read will not work.

String GetJSON() This method should return a string using JSON formatting (www.json.org). Here is the format:

{ “variable name” : value, … }

Each variable name should be surrounded by quotes. If the variable data type is String then the value should be surrounded by double quotes. There should be a comma between each <variable name, value> pair (no comma after the last <variable name, value> pair).

Example (Snickers, dog, male):

{“name” : “Snickers”, “species” : “dog”, “gender” : “male”}

Example (Princess, cat, female):

{“name” : “Princess”, “species” : “cat”, “gender” : “female”}

@Override

String toString()

This method should return a String instance (not print on the screen) that contains the values of member variables with descriptive text. Here is an example of a string that gets returned from the method.

Example date string:

Name: Snickers

Species: dog

Gender: male

Class – Procedure

Store in project/package: <your last name>.bcs345.hwk.vet.business

Member Variables (all private)

Variable Data Type Description
Name String Name of the procedure.
Price double Price of the procedure.

Member Method Signatures and Descirptions (all public)

Signature Description
Default Constructor Default constructor. Sets the values of each member variable to a default value.
Constructor – Two Parameters Constructor that sets the values of the member variables. There should be a corresponding parameter for each member variable.
Get/set methods for all member variables
void Write(PrintStream ps) Write the contents of all member variables to the given instance of PrintStream. Assume the PrintStream is already open and ready to use. Data should be written on to separate lines. DO NOT ADD ANY DESCRIPTIVE TEXT IN THE OUTPUT. JUST PRINT THE VALUES.

IMPORTANT – Whatever data is written out should be readable by the Read method of this class. If descriptive text is added then Read will not work.

void Read(Scanner s) Read the contents of all member variables from the given instance of Scanner. Assume the following:

1. Scanner is already open.

2. Member variable values are on separate lines.

String GetJSON() This method should return a string using JSON formatting (www.json.org). Here is the format:

{ “variable name” : value, … }

Each variable name should be surrounded by quotes. If the variable data type is String then the value should be surrounded by double quotes. There should be a comma between each <variable name, value> pair (no comma after the last <variable name, value> pair).

Example :

{“name” : “Rabies Shot”, “price” : 25.5}

@Override

String toString()

This method should return a String instance (not print on the screen) that contains the values of member variables with descriptive text. Here is an example of a string that gets returned from the method.

For example:

Name: Rabies Shot

Price: $25.50

Class – Main

Store in project/package: <your last name>.bcs345.hwk.vet.presentation

Member Variables (all private)

Variable Data Type Description
No member variables

Member Method Signatures and Descirptions (all public)

Signature Description
public static void main(String args[]) Write unit testing and other code in main. See below for details.

Automated Test

Use the Automated Testing slides on Blackboard as a guide when coding this section.

Create an automated test in main.

1. There should be unit tests of ALL get/set methods of both classes. GetJSON is NOT included here.

2. You need to write code that runs the other methods that are not being unit tested on each class (this includes GetJSON, constructors, Read, Write, toString etc…).

The automated test should contain code that demonstrates that ALL methods work on both classes. DO NOT TAKE THE TESTING CODE LIGHTLY. IT IS VERY IMPORTANT TO SHOW THAT EVERYTHING ON EACH CLASS WORKS.

Hint: To truly test if the output produced by the Write method of either class works you need to try and read in the file that it class generates with its Read method. For example, assume you write data to a file named “abc.txt” using the write method. You should now use “abc.txt” file as input to the read method. If the program fails on this read there is an error.

Deliverables

One winzip file containing all Eclipse projects necessary to run the program.

Project Description
<your last name>.bcs345.hwk.vet.business This project should contain a package named <your last name>. bcs345.hwk. vet.business. Create the package under the src directory in the project. This package contains the implementation for the program (Java class files).
<your last name>.bcs345.hwk.vet.presentation This project should contain a package named <your last name>. bcs345.hwk. vet.presentation. Create the package under the src directory in the project. This package contains the implementation for the program (Java class files).

Contains the test program that imports and uses the business package you created. The test program should be an automated test as described above.

Example Project/Package Setup:

hoskey.bcs345.hwk.vet.business Project

hoskey.bcs345.hwk.vet.business Package

Pet.java Source file

Procedure.java Source file

hoskey.bcs345.hwk.vet.presentation Project

hoskey.bcs345.hwk.vet.presentation Package

Main.java Source file

Pet File Format

PetName

PetSpecies

PetGender

Pet Sample Input File (Pet.txt)

Snickers

Dog

Male

Procedure File Format

ProcedureName

ProcedureCost

Procedure Sample Input File (Procedure.txt)

Rabies Shot

Please follow and like us:
error20
Tweet 176
fb-share-icon92

Calculate your paper price
Pages (550 words)
Approximate price: -

Why Choose Us

Quality Papers

At Myhomeworkwriters.com, we always aim at 100% customer satisfaction. As such, we never compromise the quality of our essay services. Our essay helpers ensure that they craft each paper carefully to match the requirements in the instruction form.

Professional Academic Writers

With Myhomeworkwriters.com, every student is guaranteed high-quality, professionally written papers. We ensure that we hire individuals with high academic qualifications who can maintain our quality policy. These writers undergo further training to sharpen their writing skills, making them more competent in writing academic papers.

Affordable Prices

Our company maintains a fair pricing system for all paper writing services to ensure affordability. Our pricing system generates quotations based on the properties of individual papers.

On-Time delivery

MyHomeworkWriters guarantees all students of swift delivery of papers. We understand that time is an essential factor in the academic world. Therefore, we ensure that we deliver the paper on or before the agreed date to give students ample time for reviewing.

100% Originality

Myhomeworkwriters.com maintains a zero-plagiarism policy. As such, MyHomeworkWriters ensure that they use the students’ instructions to deliver plagiarism-free papers. We are very keen on avoiding any chance of similarities with previous papers.

Customer Support 24/7

Our customer support works around the clock to provide students with assistance or guidance at any time of the day. Students can always communicate with us through our live chat system or our email and receive instant responses. Feel free to contact us via the Chat window or support email: support@myhomeworkwriters.com.

Try it now!

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Samples

Our writers complete papers strictly according to your instructions and needs, no matter what university, college, or high school you study in.

Categories
All samples
Analysis (any type)
Argumentative essays
Dissertation/Dissertation chapter
Analysis (any type)
Advantages and disadvantages of lowering the voting age to thirteen
Undergrad. (yrs 1-2)
Political science
4
View this sample
Argumentative essays
Is euthanasia ethical or not?
Undergrad. (yrs 3-4)
Nursing
3
View this sample
Dissertation/Dissertation chapter
Videoconferencing as a teaching tool
Undergrad. (yrs 3-4)
Education
10
View this sample

Our Essay Writing Services

MyHomeworkWriters holds a reputation for being a platform that provides high-quality academic services. All you need to do is provide us with all the necessary requirements and wait for quality results.

Essays

Essay Writing Services

At MyHomeworkWriters, we have highly qualified academic gurus who will offer great assistance towards completing your essays. Our essay help service providers are well-versed with all the aspects of developing high-quality and relevant essays.

Admissions

Admission and Business Papers

With Myhomeworkwriters.com, we will help you secure a position at your desired institution. Our essay writing services include the crafting of admissions papers. We will still help you climb your career ladder by helping you write the official papers that will help you secure a job. We will guide you on how to write an outstanding portfolio or resume.

Editing

Editing and Proofreading

Myhomeworkwriters.com has a professional editorial team that will help you organize your paper, paraphrase it, and eliminate any possible mistakes. Also, we will help you check on plagiarism to ensure that your final paper posses quality and originality.

Coursework

Technical papers

My Homework Writers harbors professional academic writers from diverse academic disciplines. As such, we can develop essay help services in all academic areas. The simplicity or complexity of the paper does not affect the quality of essay writing services.

Sitemap: https://myhomeworkwriters.com/sitemaps/sitemap.xml User-agent: * Allow: / User-agent: AhrefsBot Crawl-Delay: 1 User-agent: SemrushBot Crawl-Delay: 1
Social media & sharing icons powered by UltimatelySocial