Download presentation
Presentation is loading. Please wait.
Published byuophelp123 Tutor Modified over 6 years ago
1
Download Your Course Here: https://uopcourses.com/category/prg-421/
2
https://uopcourses.com/category/prg-421/ https://uopcourses.com/category/prg-421/ PRG 421 Week 1 Individual: Week One Analyze Assignment Resource: "Analyzing a Java™ Program Contaiing Abstract and Derived Classes" The purpose of creating an abstract class is to model an abstract situation. Example: 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 "abstract out" 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. Modeling all these customers as one abstract class ("Customer") from which many specialized customer classes derive or inherit ("InternationalCustomer,""BusinessCustomer," etc.) will allow you to define all of that information your customers have in common and put it in the "Customer" 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. In this assignment, you will analyze Java™ 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. Read through the linked Java™ code carefully. Predict the result of running the Java™ code. Writeyour prediction into a Microsoft® Word document, focusing specifically on what text you think will appear on the console after running the Java™ code. In the same Word document, answer the following question: 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? Submit your Word document to the Assignment Files tab.
3
PRG 421 Entire Course PRG 421 Week 5 Individual: Week Five Coding Assignment PRG 421 Week 5 Individual: Week Five Analyze Assignment PRG 421 Week 5 Learning Team: JDBC-Related FAQ PRG 421 Week 4 Individual: Week Four Coding Assignment PRG 421 Week 4 Individual: Week Four Analyze Assignment PRG 421 Week 4 Learning Team: Concurrency and Localization FAQ PRG 421 Week 3 Individual: Week Three Coding Assignment PRG 421 Week 3 Individual: Week Three Analyze Assignment PRG 421 Week 3 Learning Team: Stream Manipulation and Generics FAQ PRG 421 Week 2 Individual: Week Two Coding Assignment PRG 421 Week 2 Individual: Week Two Analyze Assignment PRG 421 Week 2 Learning Team: Java I/O FAQ PRG 421 Week 1 Individual: Week One Coding Assignment PRG 421 Week 1 Individual: Week One Analyze Assignment PRG 421 Week 1 Learning Team: Set Up an FAQ
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.