5/19/2023 0 Comments Portuguese podengo weight"The Afghan Hound has a life expectancy of 12-18 years." Source: Afghan Hound: 12 − 18 years American English Coonhound: 11-12years American Foxhound: 11-13 years Azawakh: 12-15 yearsīasenji: 13-14 years Basset Hound: 12-13 years Beagle: 10-15 years Black and Tan Coonhound: 10-12 years Bloodhound: 10 - 12 years Bluetick Coonhound: 11-12 years Borzoi: 9-14 years Cirneco dell'Etna: 12 − 14 years Dachshund: 12 − 16 years English Foxhound: 10-13 years Grand Basset Griffon Vendéen: 13-15 years Greyhound: 10-13 years Harrier: 12-15 years Ibizan Hound: 11-14 years Irish Wolfhound: 6 − 8 years Norweglan Elkhound: 12-15 years Otterhound: 10 - 13 years Petit Basset Griffon Vendéen: 14-16 years Pharoah Hound: 12-14 years Plott Hound: 12-14 years Portuguese Podengo Pequeno: 12-15 years Redbone Coonhound: 12-15 years Rhodesian Ridgeback: unknown Saluki: 10-17 years Scottish Deerhound: 8-11 years Sloughi: 10 - 15 years Treeing Walker Coonhound: 12 - 13 years Whippet: 12-15 years Use an appropriate decision structure to return the life expectancy of the hound, eg. Within the main method, request the user to input a hound breed 4. Create a class named Houndil feExpenctancy 2. println () to output this information in a readable format. Inside the main method, declare and assign variables to represent the following Information (remember to use appropriate datatypes and variable names): a. Read the questions carefully, completing them in order. Session 2 > Finish This Session you will be creating 3 simple classes, applying your newfound knowledge of java syntax, decision structures and user input to solve 3 simple problems. To do this, open Inteliij, then click File > New > Project > Next > Next > Name the project, e. "Weight: " + weight + " kg" to print the weight as "25.7 kg"Ĭreate a new project for this tutorial."Height: " + height + " cm" to print the height as "74.5 cm"."Purebred: " + isPurebred to print whether the dog is purebred or not as "false"."Breed: " + breed to print the breed as "Dalmatian"."Age: " + age + " years" to print the age as "2 years"."Desexed: " + isDesexed to print whether the dog is desexed or not as "true"."Gender: " + gender to print the gender as "female"."Microchip no: " + microchipNo to print the microchip number as "647388745360623"."Name: " + name to print the dog's name as "Frankie".We used concatenation ( + ) to combine the variable values with the text strings that describe them, for example: We used the () statement to print out the information in a readable format.weight : A double variable to store the dog's weight in kilograms.height : A double variable to store the dog's height in centimeters.isPurebred : A boolean variable to indicate whether the dog is purebred or not.breed : A String variable to store the dog's breed.age : An int variable to store the dog's age in years.isDesexed : A boolean variable to indicate whether the dog is desexed or not.gender : A String variable to store the dog's gender.Note that we used the L suffix to indicate that it is a long type. microchipNo : A long variable to store the dog's microchip number.name : A String variable to store the dog's name.We declared and initialized the following variables to store the information about the dog:.Inside the DogInformation class, we defined a main method using the public static void main(String args) syntax.We created a new class named DogInformation using the public class DogInformation syntax.Here's a step-by-step explanation of the solution:
0 Comments
Leave a Reply. |