Design a class named Person with fields for holding a person's name, address, and telephone number. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. Next, design a class named Customer, which extends the Person class. The Customer class should have a field for a customer number and a boolean field indicating whether the customer wishes to be on a mailing list. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. Demonstrate an object of the Customer class in a simple program.
Q: Share at least three duties that the WinMain (beginning) method is responsible for.
A: The WinMain function, which serves as the entry point for a Windows-based application, typically…
Q: Our results suggest adding a rung to Flynn's taxonomy. What makes modern computers better than their…
A: 1) Flynn's taxonomy is a classification of computer architectures based on how instructions and data…
Q: Forensic investigators often need to retrieve temporary or permanent data from Windows PCs, but how…
A: A subfield of forensic science called "digital forensics" focuses on analyze and on the road to…
Q: Cohesiveness and coupling in software design fascinate me, as does their relationship.
A: Cohesiveness and coupling are two fundamental concepts in software design that play a crucial role…
Q: t are the two strongest justifications for employing stratified protocols? Please provide evidence…
A: In the realm of networking, the concept of protocol layering, also known as stratified protocols,…
Q: Describe an implementation of the procedure RANDOM.a; b/ that only makes calls to RANDOM.0; 1/. What…
A: The procedure RANDOM.a; b/ can be implemented by making calls to RANDOM.0; 1/. The goal is to…
Q: lease answer these in short yet concise replys please... Describe two ways to recover an…
A: In this discussion, we will provide short yet concise answers to three important questions. Firstly,…
Q: Do you predominantly utilize the hard drive of your computer, or do you also utilize other storage…
A: As technology continues to evolve, so does the way we store and manage data. While hard drives have…
Q: Write a loop to display the powers of 2 exactly as shown below:
A:
Q: Explain what the term "cybersecurity" means and why it is so vital.
A: Cybersecurity is the collection of practices, technologies, and procedures to secure digital…
Q: php code print prime numbers in given range
A: Here's a PHP code snippet that prints prime numbers within a given range:<?phpfunction…
Q: ces factor into the overall sche
A: This is in contrast to the “cyber threat” in that although the Internet threat may involve an…
Q: Using layered protocols is strongly recommended for these two reasons alone: Provide evidence for…
A: 1) Layered protocols refer to a design approach in networking and communication systems where the…
Q: Trying to start a database that can track employers, customers, and their references. It needs to…
A: As you start designing your database for tracking employers, customers, and their references, it's…
Q: The advantages and disadvantages of connectionless protocols must be compared to those of…
A: Introduction: In computer networking, communication between devices can be achieved through either…
Q: Manufacturers must create affordable, dependable computers. If you could make low-cost, high-quality…
A: If I were to create low-cost, high-quality computers, I would focus on several key…
Q: Describe the various applications where you have found Automata Theory to be useful.
A: 1) Automata theory is a branch of theoretical computer science that deals with the study of abstract…
Q: Why these cybercrime patterns are appearing now is a conundrum. If you could tell me where you…
A: The emergence and evolution of cybercrime patterns is a complex and multifaceted phenomenon,…
Q: Where would you go if you deleted a file by accident and need it again?
A: When a file is deleted, its space on the storage device is marked as available for reuse, and the…
Q: Register-register architecture restricts the capabilities of vector processing.
A: Register-register building is a type of computer building that uses registers for both source and…
Q: Explain intellectual property and the kinds of works it includes. Explain how copyright laws protect…
A: The answer is given below step.
Q: Does a foreign key affect database integrity? What's your evidence?
A: In computer science, ensuring the integrity of a Database is crucial for maintaining data accuracy…
Q: mpiler, and an interpr
A: Assemblers, compilers, and interpreters are software tools that are used to translate code written…
Q: Active hardware metering in EPIC secures computer systems throughout development. How do these three…
A: Active hardware metering in EPIC systems enables real-time system behavior monitoring and detects…
Q: What is the typical IT implementation process? What are the roles and responsibilities involved in…
A: The successful implementation of an IT system is a critical undertaking for organizations looking to…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: The provided C++ program calculates the area and volume of a sphere.It prompts the user to input the…
Q: Create a list of bullet points detailing how the computer boots up.
A: When you turn on the computer, the first thing it does is to perform a self-diagnostic test called…
Q: With practical examples, discuss the difference(s) between a Web Server software and a Web Client…
A: A web server software and a web client software are two essential components of the client-server…
Q: Write a loop to display the powers of 2 exactly as shown below: 1 2 4 8 16 32 64 128
A: Here are the steps : First create the main method to run the code within Create the variable to run…
Q: What is the SDLC?
A: What is SDLC
Q: * ** *** **** ***** **** *** ** * Print this pattern using c programming language.
A: 1) Below is C program that prints the pattern2) The program uses nested loops to iterate over the…
Q: What are some of the various approaches to data flow documentation?
A: Data flow refers to the movement and transformation of data within a system or organization. It…
Q: Write a sequence of statements to create a file with fileName's name and a line saying "This Is…
A: In this problem, it is asked to write the sequence of statements for creating a file with filename's…
Q: Phishing may be used alongside spoofing and other methods to deceive. Phishing alone is conceivable.…
A: Phishing and spoofing are two common cyber security pressures that often work give in hand. Phishing…
Q: How useful is compiler knowledge in practice?
A: A compiler is a specialized computer program that converts the source code of one programming…
Q: "Resist the impulse to code" in programming means what?
A: In the world of programming, the phrase "resist the impulse to code" serves as a valuable reminder…
Q: Hashing notes should be thorough. (Hashing, hash tables, collision, collision detection algorithms,…
A: Hashing is a technique to uniquely identify a specific object from a group of similar things. A key…
Q: How do the advantages and disadvantages of disk write caching operations compare?
A: Understanding Disk Write CachingDisk write caching is a mechanism used to improve the performance…
Q: Describe the distinctions between object-oriented and procedural programming languages and their…
A: There are many programming paradigms that govern how software is built, organize and executed in…
Q: Is it true? For simplicity, a TCP connection's most recent SampleRTT is one second. If…
A: A TCP (Transmission Control Protocol) connection is a communication channel established between two…
Q: Define "scalability" in relation to cloud computing. How do the various components of the…
A: In cloud computing, scalability refers to the system's ability to handle increased or decreased…
Q: What is the importance of linux partitioning?
A: Partitioning in LinuxPartitioning is a creation of separate divisions of the hard disk ,When a disk…
Q: RAM and Register are the two types of storage space in a computer.
A: In processor systems, RAM (Random Access Memory) and registers are two essential types of storage…
Q: The data, address, and control channels each serve distinct purposes.
A: Data, address, and control channels are fundamental components of a communication system. They serve…
Q: The consequences of compromising the referential integrity of a database would be calamitous. What…
A: Referential integrity maintenance is a critical component of database administration. Referential…
Q: Suppose we use a hash function h to hash n distinct keys into an array T of length m. Assuming…
A: To find the expected number of collisions when hashing n distinct keys into an array T of length m,…
Q: What about renaming it "Object-Orientation"? The development of applications that emphasizes…
A: Object-oriented programming (OOP) is a computer programming model that organizes software design…
Q: How does a bottom-up versus a top-down approach to information security differ?
A: A bottom-up approach and a top-down approach are two distinct strategies employed in the field of…
Q: You are given an array of integers that contain numbers in random order. Write a program to find and…
A: In this question we need to write a program to find the most frequent element in an array where in…
Q: Explain why database access control is more important than flat-file systems. How do database…
A: Database access control refers to managing and restricting access to a database system based on the…
Step by step
Solved in 5 steps with 3 images
- Design a class named Person with properties for holding a person’s name, address, and telephone number. Next, design a class named Customer, which is derived from the Person class. The Customer class should have a property for a customer number and a Boolean property indicating whether the customer wishes to be on a mailing list. Demonstrate an object of the Customer class in a simple application.Design a class named Person with fields for holding a person's name, address, and telephone number (all as Strings). Write a constructor that initializes all of these values, and mutator and accessor methods for every field. Next, design a class named Customer, which inherits from the Person class. The Customer class should have a String field for the customer number and a boolean field indicating whether the customer wishes to be on a mailing list. Write a constructor that initializes these values and the appropriate mutator and accessor methods for the class's fields. Demonstrate the Customer class in a program that prompts the user to enter values for the customer's name, address, phone number, and customer number, and then asks the user whether or not the customer wants to receive mail. Use this information to create a customer object and then print its information. Put all of your classes in the same file. To do this, do not declare them public. Instead, simply write: class Person…Define a class named Employee. This class should extend the Person class from the previous question. The class should have a constructor, which takes the name, age, employer (String) and salary (int) as parameters (in that order). The first two parameters should be passed to the constructor of the superclass and the value of the last two parameters should be stored in instance variables. The class should define the methods, getSalary which returns the salary of the employee and getEmployer which returns the name of the employer. Any methods from the previous question that need to be overridden should be overridden! Use super and instanceof as appropriate. I.e., for the following methods you should be able to call the method in the superclass for specific situations (e.g. the compareTo method in the superclass can be called if you receive anything other than an Employee, and this also holds for the equals method). The toString method only needs to append details and as such can also…
- Design a Friend class that the following members: • A field for the name of the friend (a string). •A field for the cell phone number of the friend (a string). • A field for the gender of the friend (a character F or M). • A static field numObjects (integer). Constructors: A default constructor and a parameterized constructor. Accessors methods for the data fields. Set methods for the cell phone data field and the numObjects field. A toString() method that displays the data fields. Design a testFriend driver class that has an arrFriends array that can hold up to a maximum of 15 objects. Write a static fillArray() method that receives the arrFriends array and allow the user to enter the information of a number of friends. Save the objects to the array. Return the array to the call statement. Write a static displayArray) method that receives the arrFriends array as parameter and display a numbered list of information on the objects saved in the array. Write a static sortData() method…Exercise 2 Design a class named Customer with field holding for customer's name, address, and telephone number. Customer's name and address can only be accessed by Customer class. Telephone number can only be accessed by its subclass. Write two overloading constructors and the appropriate setter and getter methods for the class's fields. A retail store has a preferred customer plan where customers can earn discounts on all their purchases. The amount of a customer's discount is determined by the amount of the customer's cumulative purchases in the store as follows: • When a preferred customer spends RM500, he or she gets 5 percent discount on all future purchases • When a preferred customer spends RM1,000, he or she gets 6 percent discount on all future purchases • When a preferred customer spends RM1,500, he or she gets 7 percent discount on all future purchases When a preferred customer spends RM2,000 or more, he or she gets 10 percent discount on all future purchases Design a class…Create abstract class Pet , which is the abstract superclass of all animals. Declare a integer attribute called legs, which records the number of legs for this animal. Define a constructor that initializes the legs attribute. Declare an abstract method eat. Declare a concrete method walk that prints out something about how the animals walks (include the number of legs). Create the Dog class. The Dog class extends the Pet class. This class must include a String attribute to store the name and food of the pet Define a default constructor that calls the superclass constructor to specify that all dogs have 4 legs and name. override the eat and walk method. Create the Cat class that extends Pet. This class must include a String attribute to store the name of the pet, and a string to save food . Define a constructor that takes one String parameter that specifies the cat's name and food. This constructor must also call the superclass constructor to specify that all cats have four legs.…
- Person and Customer Classes Write a class named (Person) with data attributes for a person’s name, address, and telephone number. Provide accessors/getters and mutators/setters for each attribute. Write a displayPerson() to print out the attributes of the Person. Next, write a class named (Customer) that is a subclass of the (Person) class. The (Customer) class should have a data attribute for a customer number, and a Boolean data attribute indicating whether the customer wishes to be on a mailing list. Provide accessors/getters and mutators/setters for each attribute. Write a display customer() to print out the attributes of the Customer. Demonstrate an instance of the (Customer) class in a simple program.Create abstract class Pet , which is the abstract superclass of all animals. Declare a integer attribute called legs, which records the number of legs for this animal. Define a constructor that initializes the legs attribute. Declare an abstract method eat. Declare a concrete method walk that prints out something about how the animals walks (include the number of legs). Create the Dog class. The Dog class extends the Pet class. This class must include a String attribute to store the name and food of the pet Define a default constructor that calls the superclass constructor to specify that all dogs have 4 legs and name. override the eat and walk method. Create the Cat class that extends Pet. This class must include a String attribute to store the name of the pet, and a string to save food . Define a constructor that takes one String parameter that specifies the cat's name and food. This constructor must also call the superclass constructor to specify that all cats have four legs.…1. Create abstract class Pet , which is the abstract super class of all animals.1. Declare an integer attribute called legs, which records the number of legs for this animal.2. Define a constructor that initializes the legs attribute.3. Declare an abstract method eat.4. Declare a concrete method walk that prints out something about how the animals walks (include the number of legs).2. Create the Dog class that implements Pet class.1. This class must include a String attribute to store the name and food of the pet2. Define a default constructor that calls the super class constructor to specify that all dogs have 4 legs and name.3. override the eat and walk method.3. Create the Cat class that Implements Pet class.1. This class must include a String attribute to store the name of the pet, and a string to save food .2. Define a constructor that takes one String parameter that specifies the cat's name. This constructor must also call the super class constructor to specify that all cats have…
- Create abstract class Pet , which is the abstract superclass of all animals.Declare a integer attribute called legs, which records the number of legs for this animal.Define a constructor that initializes the legs attribute.Declare an abstract method eat.Declare a concrete method walk that prints out something about how the animals walks (include the number of legs).Create the Dog class.The Dog class extends the Pet class.This class must include a String attribute to store the name and food of the petDefine a default constructor that calls the superclass constructor to specify that all dogs have 4 legs and name.override the eat and walk method.Create the Cat class that extends Pet.This class must include a String attribute to store the name of the pet, and a string to save food .Define a constructor that takes one String parameter that specifies the cat's name and food. This constructor must also call the superclass constructor to specify that all cats have four legs.Override walk…The classes Name and Date are separate classes used as properties in the Employee class. Class Employee is the superclass of the classes SalariedEmployee and HourlyEmployee. The superclass has the attributes name and data of hire and methods to set and get these attributes. It also has 2 abstract methods equals() which check if the objects are same and toString() which convert the properties to a printable string. Also the method read() which used as an input method. The SalariedEmployee subclass has in addition to the attributes of the super-class the attribute annualSalary and set and get methods for it. This class also defines the read() method and grossPay() which in this case returns the salary of the employee. The HourlyEmployee subclass has in addition to the attributes of the super-class, the hoursWorked and hourlyRate attributes. It provides ‘get’ and ‘set’ methods for these attributes. Also it provides the methods equals() and toString(). Finally, it provides an…Java Object Oriented Programming Create a Shape class that shall have color and filled instance variables of enum Color and boolean type. The filled boolean variable shall show, whether the shape is filled (colored). The enum Color shall be defined within the class having 4 color names (choose any four). Also define getArea and getPerimeter method in Shape class, both shall return 0. Create Rectangle class with length and width attributes and a Circle class with radius attribute, of type double. Properly encapsulate all fields. Circle and Rectangle shall extend Shape class and override getArea and getPerimters methods as per its type and specific formula. In Test class, create an object of Rectangle and Circle, by initializing all attributes in constructor and print both shapes' area and perimters. In Test class, define a static method with following signature, public static void printEachShapeCount(Shape... shapes) As you know, the parent type variable can hold the…