1 / 2

PRG 421 Week 1 Individual Week One Analyze Assignment//tutorfortune.com

PRG 421 Week 1 Individual Week One Analyze Assignment//tutorfortune.com<br><br>Click on below link to buy<br>https://tutorfortune.com/products/prg-421-week-1-individual-week-one-analyze-assignment<br><br>PRG 421 Week 1 Individual Week One Analyze Assignment<br><br>Resource:<br><br> <br><br>u201cAnalyzing a Javau2122 Program Contaiing Abstract and Derived Classesu201d<br><br>The purpose of creating an abstract class is to model an abstract situation.<br><br> <br><br>Example:<br><br> <br><br>You work for a company that has different types of customers: domestic, international, business partners, individuals, and so on. It well may be useful for you to u201cabstract outu201d all the information that is common to all of your customers, such as name, customer number, order history, etc., but also keep track of the information that is specific to different classes of customer. For example, you may want to keep track of additional information for international customers so that you can handle exchange rates and customs-related activities, or you may want to keep track of additional tax-, company-, and department-related information for business customers.<br><br> <br><br>Modeling all these customers as one abstract class (u201cCustomeru201d) from which many specialized customer classes derive or inherit (u201cInternationalCustomer,u201d u201cBusinessCustomer,u201d etc.) will allow you to define all of that information your customers have in common and put it in the u201cCustomeru201d class, and when you derive your specialized customer classes from the abstract Customer class you will be able to reuse all of those abstract data/methods.This approach reduces the coding you have to do which, in turn, reduces the probability of errors you will make. It also allows you, as a programmer, to reduce the cost of producing and maintaining the program.<br><br> <br><br>In this assignment, you will analyze Javau2122 code that declares one abstract class and derives three concrete classes from that one abstract class. You will read through the code and predict the output of the program.<br><br> <br><br>Read through the linked Javau2122 code carefully.<br><br> <br><br>Predict the result of running the Javau2122 code. Writeyour prediction into a Microsoftu00ae Word document, focusing specifically on what text you think will appear on the console after running the Javau2122 code.<br><br> <br><br>In the same Word document, answer the following question:<br><br> <br><br>Why would a programmer choose to define a method in an abstract class, such as the Animal constructor method or the getName() method in the linked code example, as opposed to defining a method as abstract, such as the makeSound() method in the linked example?<br><br>Submit your Word document to the Assignment Files tab.<br> PRG 421 Week 1 Individual Week One Analyze Assignment<br><br>Click on below link to buy<br>https://tutorfortune.com/products/prg-421-week-1-individual-week-one-analyze-assignment<br><br>

tutortip
Download Presentation

PRG 421 Week 1 Individual Week One Analyze Assignment//tutorfortune.com

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PRG 421 Week 1 Individual Week One Analyze Assignment//tutorfortune.com Click on below link to buy https://tutorfortune.com/products/prg-421-week-1-individual-week-one-analyze- assignment P R G 4 2 1 We e k 1 I n d i v i d u a l We e k O n e A n a l y z e A s s i g n me n t R e s o u r c e :   “ A n a l y z i n g a J a v a ™ P r o g r a m C o n t a i i n g A b s t r a c t a n d D e r i v e d C l a s s e s ” T h e p u r p o s e o f c r e a t i n g a n a b s t r a c t c l a s s i s t o mo d e l a n a b s t r a c t s i t u a t i o n .   E x a mp l e :   Y o u w o r k f o r a c o mp a n y t h a t h a s d i ff e r e n t t y p e s o f c u s t o me r s : d o me s t i c , i n t e r n a t i o n a l , b u s i n e s s p a r t n e r s , i n d i v i d u a l s , a n d s o o n . I t w e l l ma y b e u s e f u l f o r y o u t o “ a b s t r a c t o u t ” a l l t h e i n f o r ma t i o n t h a t i s c o mmo n t o a l l o f y o u r c u s t o me r s , s u c h a s n a me , c u s t o me r n u mb e r , o r d e r h i s t o r y , e t c . , b u t a l s o k e e p t r a c k o f t h e i n f o r ma t i o n t h a t i s s p e c i fi c t o d i ff e r e n t c l a s s e s o f c u s t o me r . F o r e x a mp l e , y o u ma y w a n t t o k e e p t r a c k o f a d d i t i o n a l i n f o r ma t i o n f o r i n t e r n a t i o n a l c u s t o me r s s o t h a t y o u c a n h a n d l e e x c h a n g e r a t e s a n d c u s t o ms - r e l a t e d a c t i v i t i e s , o r y o u ma y w a n t t o k e e p t r a c k o f a d d i t i o n a l t a x - , c o mp a n y - , a n d d e p a r t me n t - r e l a t e d i n f o r ma t i o n f o r b u s i n e s s c u s t o me r s .   Mo d e l i n g a l l t h e s e c u s t o me r s a s o n e a b s t r a c t c l a s s ( “ C u s t o me r ” ) f r o m w h i c h ma n y s p e c i a l i z e d c u s t o me r c l a s s e s d e r i v e o r i n h e r i t ( “ I n t e r n a t i o n a l C u s t o me r , ” “ B u s i n e s s C u s t o me r , ”   e t c . ) w i l l a l l o w y o u t o d e fi n e a l l o f t h a t i n f o r ma t i o n y o u r c u s t o me r s h a v e i n c o mmo n a n d p u t i t i n t h e “ C u s t o me r ” c l a s s , a n d w h e n y o u d e r i v e y o u r s p e c i a l i z e d c u s t o me r c l a s s e s f r o m t h e a b s t r a c t C u s t o me r c l a s s y o u w i l l b e a b l e t o r e u s e a l l o f t h o s e a b s t r a c t d a t a / me t h o d s . T h i s a p p r o a c h r e d u c e s t h e c o d i n g y o u h a v e t o d o w h i c h , i n t u r n , r e d u c e s t h e p r o b a b i l i t y o f e r r o r s y o u w i l l ma k e . I t a l s o a l l o w s y o u , a s a p r o g r a mme r , t o r e d u c e t h e c o s t o f p r o d u c i n g a n d ma i n t a i n i n g t h e p r o g r a m.   I n t h i s a s s i g n me n t , y o u w i l l a n a l y z e J a v a ™ c o d e t h a t d e c l a r e s o n e a b s t r a c t c l a s s a n d d e r i v e s t h r e e c o n c r e t e c l a s s e s f r o m t h a t o n e a b s t r a c t c l a s s . Y o u w i l l r e a d t h r o u g h t h e c o d e a n d p r e d i c t t h e o u t p u t o f t h e p r o g r a m.   R e a d t h r o u g h t h e l i n k e d J a v a ™ c o d e c a r e f u l l y .

  2.   P r e d i c t t h e r e s u l t o f r u n n i n g t h e J a v a ™ c o d e . Wr i t e y o u r p r e d i c t i o n i n t o a Mi c r o s o f t ® Wo r d d o c u me n t , f o c u s i n g s p e c i fi c a l l y o n w h a t t e x t y o u t h i n k w i l l a p p e a r o n t h e c o n s o l e a f t e r r u n n i n g t h e J a v a ™ c o d e .   I n t h e s a me Wo r d d o c u me n t , a n s w e r t h e f o l l o w i n g q u e s t i o n :   Wh y w o u l d a p r o g r a mme r c h o o s e t o d e fi n e a me t h o d i n a n a b s t r a c t c l a s s , s u c h a s t h e A n i ma l c o n s t r u c t o r me t h o d o r t h e g e t N a me ( ) me t h o d i n t h e l i n k e d c o d e e x a mp l e , a s o p p o s e d t o d e fi n i n g a me t h o d a s a b s t r a c t , s u c h a s t h e ma k e S o u n d ( ) me t h o d i n t h e l i n k e d e x a mp l e ? S u b mi t y o u r Wo r d d o c u me n t t o t h e A s s i g n me n t F i l e s t a b .   P R G 4 2 1 We e k 1 I n d i v i d u a l We e k O n e A n a l y z e A s s i g n me n t Click on below link to buy https://tutorfortune.com/products/prg-421-week-1-individual-week-one-analyze- assignment

More Related