Complete the program class Person { public: string profession; int age; Person (): profession("unemployed"), age(16) { } void display () { cout << "My profession is: " << profession << endl; cout << "My age is: " << age << endl; walk(); talk(); void walk() { cout << "I can walk." << endl; } void talk() { cout << "I can talk." << endl; } class Maths Teacher class Footballer
Q: 1. PerimeterTriangle - compute the perimeter of a triangle
A: Object: An object is nothing but a from class. Each object has a character, an approach to acting,…
Q: How can I print the percentage % character in C language because when I am trying to print it using…
A: CODE:
Q: Please help... C++ Basic Arithmetic You are a cook in a restaurant. You need exactly 3 crabs to cook…
A: PROGRAM INTRODUCTION: Include the required header files. Start definition of the main function.…
Q: Write down the values of Carry, Overflow, Zero, Sign, Auxiliary Carry, Parity flag after each…
A: According to the information given:- We have to follow the instruction and find out the values of…
Q: Write a C programming to find out maximum and minimum of some values using function which will…
A: The question is to write C code for the given problem.
Q: Write a program to draw a beautiful artboard
A: C programming is the object oriented programming languages that are used to create the web…
Q: Provide screen shot of every step other wise I will give down vote Create a AWS lambda function in…
A: The above question is solved in step 2 :-
Q: Please explain the significance of the main information systems. Security measures include…
A: Introduction: A well developed information system saves the data in a database, which makes it much…
Q: What are the ramifications if, as has been proposed, the cloud computing movement has an impact on…
A: Introduction: Using cloud computing, many services may be offered through the Internet. Among these…
Q: Provide screen shot of every step other wise I will give down vote Create a redshift cluster in AWS…
A: The above question is solved in step 2 :-
Q: s used to determine if the program renders the correct output. Select one: True False B.…
A: Given : A. Test data is used to determine if the program renders the correct output.
Q: Write a python program to get the binary of a user entered number without using loops, recursion and…
A: * Python Code * print("Enter a number: ", end="") enum = int(input()) binnumber = 0 multi =…
Q: Write down the values of Carry, Overflow, Zero, Sign, Auxiliary Carry, Parity flag after each…
A: When a particular Flag is set?? Carry Flag : It is set when the result is more than n bits Overflow…
Q: Study how wireless networks affect developing nations. One reason may be the lack of LANs or other…
A: wireless networks affect developing nations
Q: (c) Figure 4 shows the design of SMART aquaculture system comprises of 4 End-Node Unit (ENU), 1…
A: Distance between server and gateway is 3M and distance between gateway tank1 is 11KM and Gateway to…
Q: Following is a problem statement. Which of the below is the correct trace table for the problem…
A:
Q: Draw the waveform for the data 1100111010 using the following encoding schemes: (i) Unipolar NRZ (i)…
A:
Q: This virtual machine is perceived by the OS and the user application differently. Compare and…
A: Running an operating system in the form of a virtual machine on your desktop gives you the illusion…
Q: Prompt For this project, you will be developing a PY file that contains your code in PyCharm and…
A: ANSWER:-
Q: You are free to use or not use Mathematica to do the following problem. (a) Let o(x, y, z) = ry + z.…
A:
Q: What are the roles of the approval committee during the different SDLC phases ?
A: The Software Development Life cycle is the process by which it is structured which enables the…
Q: 3. There were steps in the requirement engineering process that had to be taken in order to gather…
A: Answer: 1) Inception:* In this phase or step, we would know how the concept of the software to be…
Q: Discuss the advantages of using the grid method when developing HTML pages.
A: Here we will discuss How the grid system can be used while designing Html pages, and discuss its…
Q: 21. Create a program in C++ to find the product of the ASCII values of all digits in the string…
A: #include<bits/stdc++.h> using namespace std; int main() { cout<<"Enter string\n"; string…
Q: Show the result of applying the following operators to the following image. Consider padding the…
A: So the matrix after padding is :- 0 0 0 0 0 0 95 100 105 0 0 105 100 110 0 0 85 95 105 0…
Q: What exactly is Health IT information blocking?
A: Introduction: In general, information blocking is a practise by a certified health IT developer,…
Q: Computer science: Talk about the three methods used to enhance quality assurance.
A: Three techniques that help in the improvement of the QA are as follows:
Q: Simple System Design for chat message app
A: A chat application fills various roles for various individuals. It is critical to make certain about…
Q: of my adder and subtractor if I want a maximum ou
A: size of my adder and subtractor if I want a maximum output of 6-bits is 6 Please find the…
Q: I need an operand and description of these JC, JNC, JZ, JNZ, JP conditions.
A: The operand and description of above JC, JNC, JZ, JNZ, JP conditions are given in next step.
Q: Select one: a. b. d. assign display enter calculate calculate calculate display assign display enter…
A: A trace table is a tool for testing algorithms and determining how they will be carried out by…
Q: What perimeter and network protection strategies do you think are the most successful for protecting…
A: Answer: Firewalls Firewalls are a basic component of any perimeter defense. Firewalls are sets of…
Q: In the access network for remote PHY (R-PHY), what generates the DOCSIS downstream signal and…
A: According to the information given:- We have to choose the correct option to satisfied the…
Q: I need ideas for a Python programming project that includes the handling of an input file (data or…
A: Hello Student I used the visual studio to explain this solution :-
Q: Write down the values of Carry, Overflow, Zero, Sign, Auxiliary Carry, Parity flag after each…
A: When a particular Flag is set?? Carry Flag : It is set when the result is more than n bits Overflow…
Q: Instructions: Visit the website Google Hacking Database…
A:
Q: Write a program to draw a beautiful artboard
A: Actually, program is an executable software that runs on a computer.
Q: What models of business processes are used for web applications? What would happen to a web…
A: Solution: There are two key considerations while choosing the development process model. 1) The size…
Q: 1.7 Comment out the loops that print text with std::cout to avoid too much text printing to the…
A: AS PER THE INSTRUCTIONS FROM BARTLEBY WE ARE SUPPOSED TO SOLVE ONLY ONE QUESTION,THEREFORE I AM…
Q: What would be the value of y after the following statements are executed? {int y = 36; if(y== 35) y…
A:
Q: reate a new Java project/class called FamilyMembers. Ask user how many family members they have and…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: Write down the values of Carry, Overflow, Zero, Sign, Auxiliary Carry, Parity flag after each…
A: We will be using assembly language instructions to solve this question. Below is the solution.
Q: employee based on how many hours they worked. For this company, an employee earns $20 an hour for…
A: Please check the step 2 for solution
Q: Create a class Time which contains: . Hours • Minutes Seconds ● Write a C++ program using operator…
A: #include<iostream>using namespace std;class time{private:int hr, min, sec;public:time(){hr =…
Q: What is CGI? Why was CGI introduced? What are the disadvantages of an architecture using CGI…
A: The answer is given in the below step
Q: According to you, when a business should utilize PaaS and when they should think about IaaS? Why?
A: Introduction: Platform as a Service (PaaS) enables software programs to use cloud services. It gives…
Q: Write a C++ program using operator overloadin
A: //C++ Program #include<iostream.h>#include<conio.h> class Time{ public:…
Q: Desgin a SOQL Query to fetch Different account records that will start with "A" Or "T" Or "H" Or…
A: ANSER:
Q: Explain the phrase "cybersecurity" and why it is important Internet?
A: Introduction: Cybersecurity is the process of defending against cyber assaults on internet-connected…
Q: Write a python program to get the binary of a user entered number without using loops, recursion and…
A: print("Enter a Number: ", end="")Enum = int(input()) bnumber = 0mul = 1while Enum>0: rem =…
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Step by step
Solved in 3 steps with 1 images
- interface StudentsADT{void admissions();void discharge();void transfers(); }public class Course{String cname;int cno;int credits;public Course(){System.out.println("\nDEFAULT constructor called");}public Course(String c){System.out.println("\noverloaded constructor called");cname=c;}public Course(Course ch){System.out.println("\nCopy constructor called");cname=ch;}void setCourseName(String ch){cname=ch;System.out.println("\n"+cname);}void setSelectionNumber(int cno1){cno=cno1;System.out.println("\n"+cno);}void setNumberOfCredits(int cdit){credits=cdit;System.out.println("\n"+credits);}void setLink(){System.out.println("\nset link");}String getCourseName(){System.out.println("\n"+cname);}int getSelectionNumber(){System.out.println("\n"+cno);}int getNumberOfCredits(){System.out.println("\n"+credits); }void getLink(){System.out.println("\ninside get link");}} public class Students{String sname;int cno;int credits;int maxno;public Students(){System.out.println("\nDEFAULT constructor…public class Application { public static void main(String[] args) { Employee empl = new Employee(); empl.firstName = "Ali"; empl.lastName = "Omar"; empl.salary = 20000; Employee emp2 = new Employee(); emp2.firstName = "Mohamed"; emp2.lastName = "Nour"; emp2.salary = 30000; System.out.println("- System.out.printin("- empl.employeeSalary(); System.out.println("- empl.checkEmployeeSalary(emp1.salary, emp2.salary); System.out.printin("- System.out.println("- printEmployee(emp2); System.out.printin("- Employee employeeArr[] = new Employee[2]: employeeArr[0] = empl; employeeArr[1] = emp2; Application a = new Åpplication(); a.printArrayofEmployee(employeeArr); Non static (instance) start to call Static function to print ---------"); "); - Non Static function to print - --"); Non static (instance) start to call same class Static function to print --------); -"); Non Static function to print ----); System.out.println("- System.out.printin("- System.out.printin("Salary : " + Employee.salary);…Public Class SavingsAccount { float interest; float FixedDeposit; SeniorAccount(float interest, float FixedDeposit) { this. interest = interest; this.fixedDeposit= FixedDeposit; } float calculateInterest(); { System.out.println(“Calculating Savings Account Interest”); return(FixedDeposit*interest/100); } } Public Class SeniorAccount extends SavingAccount { float seniorInterest; SeniorAccount(float interest, float FixedDeposit) { this.seniorInterest=interest; super(interest, FixedDeposit) } float calculateInterest() { System.out.println(“Calculating Savings Account Interest”); return(FixedDeposit*seniorinterest/10); } } Public static void main(String args[]) { SavingsAccount saving = new SavingsAccount(6,100000); System.out.println(saving.calculateinterest()); SeniorAccount senior=new seniorAccount(10,100000); System.out.println(Senior.calculateInterest()); } Correct the syntax and logical error
- Public Class SavingsAccount { float interest; float FixedDeposit; SeniorAccount(float interest, float FixedDeposit) { this. interest = interest; this.fixedDeposit= FixedDeposit; } float calculateInterest(); { System.out.println(“Calculating Savings Account Interest”); return(FixedDeposit*interest/100); } } Public Class SeniorAccount extends SavingAccount { float seniorInterest; SeniorAccount(float interest, float FixedDeposit) { this.seniorInterest=interest; super(interest, FixedDeposit) } float calculateInterest() { System.out.println(“Calculating Savings Account Interest”); return(FixedDeposit*seniorinterest/10); } } Public static void main(String args[]) { SavingsAccount saving = new SavingsAccount(6,100000); System.out.println(saving.calculateinterest()); SeniorAccount senior=new seniorAccount(10,100000); System.out.println(Senior.calculateInterest()); } Rubric: Correct the syntax and logical errors Proper working codeInstrument.java public class Instrument { protectedStringinstrumentName; protectedStringinstrumentManufacturer; protectedintyearBuilt, cost; publicvoidsetName(StringuserName) { instrumentName = userName; } publicStringgetName() { return instrumentName; } publicvoidsetManufacturer(StringuserManufacturer) { instrumentManufacturer = userManufacturer; } publicStringgetManufacturer(){ return instrumentManufacturer; } publicvoidsetYearBuilt(intuserYearBuilt) { yearBuilt = userYearBuilt; } publicintgetYearBuilt() { return yearBuilt; } publicvoidsetCost(intuserCost) { cost = userCost; } publicintgetCost() { return cost; } publicvoidprintInfo() { System.out.println("Instrument Information: "); System.out.println(" Name: " + instrumentName); System.out.println(" Manufacturer: " + instrumentManufacturer); System.out.println(" Year built: " + yearBuilt); System.out.println(" Cost: " + cost); } } StringInstrument.java // TODO: Define a class: StringInstrument that is derived from…public class FoodItem { private String name; private double fat; private double carbs; private double protein; // TODO: Define default constructor // TODO: Define second constructor with parameters to initialize private fields (name, fat, carbs, protein) public String getName() { return name; } public double getFat() { return fat; } public double getCarbs() { return carbs; } public double getProtein() { return protein; } public double getCalories(double numServings) { // Calorie formula double calories = ((fat * 9) + (carbs * 4) + (protein * 4)) * numServings; return calories; } public void printInfo() { System.out.println("Nutritional information per serving of " + name + ":"); System.out.printf(" Fat: %.2f g\n", fat); System.out.printf(" Carbohydrates: %.2f g\n", carbs); System.out.printf(" Protein: %.2f g\n", protein); }} import java.util.Scanner; public class NutritionalInfo {…
- public class LabProgram { public static void main(String args[]) { Course course = new Course(); String first; // first name String last; // last name double gpa; // grade point average first = "Henry"; last = "Cabot"; gpa = 3.5; course.addStudent(new Student(first, last, gpa)); // Add 1st student first = "Brenda"; last = "Stern"; gpa = 2.0; course.addStudent(new Student(first, last, gpa)); // Add 2nd student first = "Jane"; last = "Flynn"; gpa = 3.9; course.addStudent(new Student(first, last, gpa)); // Add 3rd student first = "Lynda"; last = "Robison"; gpa = 3.2; course.addStudent(new Student(first, last, gpa)); // Add 4th student course.printRoster(); } } // Class representing a student public class Student { private String first; // first name private String last; // last name private double gpa; // grade point average…Artwork label (classes/constructors) PYTHON ONLY Define the Artist class with a constructor to initialize an artist's information and a print_info() method. The constructor should by default initialize the artist's name to "None" and the years of birth and death to 0. print_info() should display Artist Name, born XXXX if the year of death is -1 or Artist Name (XXXX-YYYY) otherwise. Define the Artwork class with a constructor to initialize an artwork's information and a print_info() method. The constructor should by default initialize the title to "None", the year created to 0, and the artist to use the Artist default constructor parameter values. Ex: If the input is: Pablo Picasso18811973Three Musicians1921 the output is: Artist: Pablo Picasso (1881-1973)Title: Three Musicians, 1921 If the input is: Brice Marden1938-1Distant Muses 2000 the output is: Artist: Brice Marden, born 1938Title: Distant Muses, 2000Object Oriented Programming in JAVA You are part of a team writing classes for the different game objects in a video game. You need to write classes for the two human objects warrior and politician. A warrior has the attributes name (of type String) and speed (of type int). Speed is a measure of how fast the warrior can run and fight. A politician has the attributes name (of type String) and diplomacy (of type int). Diplomacy is the ability to outwit an adversary without using force. From this description identify a superclass as well as two subclasses. Each of these three classes need to have a default constructor, a constructor with parameters for all the instance variables in that class (as well as any instance variables inherited from a superclass) accessor (get) and mutator (set) methods for all instance variables and a toString method. The toString method needs to return a string representation of the object. Also write a main method for each class in which that class is…
- C# List the differences between CommissionEmployee class and BasePlusCommissionEmployee class public class BasePlusCommissionEmployee { public string FirstName { get; } public string LastName { get; } public string SocialSecurityNumber { get; } private decimal grossSales; private decimal commissionRate; private decimal baseSalary; public BasePlusCommissionEmployee(string firstName, string lastName, string socialSecurityNumber, decimal grossSales, decimal commissionRate, decimal baseSalary) { FirstName = firstName; LastName = lastName; SocialSecurityNumber = socialSecurityNumber; GrossSales = grossSales; CommissionRate = commissionRate; BaseSalary = baseSalary; } public decimal GrossSales { get { return grossSales; } set { if (value < 0) // validation { throw new ArgumentOutOfRangeException(nameof(value),…class Lease{ private String name; private int aptNumber; private double rent; private int term; private static final int FEE = 10; public Lease(){ name = "XXX"; aptNumber = 0; rent = 1000; term = 12; } public void setName(String tenant) { name = tenant; } public void setAptNumber(int apt){ aptNumber = apt; } public void setRent(double monthRent) { rent = monthRent; } public void setTerm(int t){ term = t; } public String getName(){ return name; } public int getAptNumber(){ return aptNumber; } public double getRent(){ return rent; } public int getTerm(){ return term; } public void addPetFee(){ rent = rent + FEE; } } Create a class named TestLease as instructed below: Instantiate four Lease objects in the main()method. Change the aptNumber value for the first object to 20 Change the rent value…Java Assignment Outcomes: Student will demonstrate the ability to utilize inheritance in a Java program. Student will demonstrate the ability to apply the IS A and HAS A relationships. Program Specifications: Start by watching Video Segment 16 from Dr. Colin Archibald's video series (found in the module overview). Key in the program shown in the video and make sure it works. Then, add the following: Animals have a Weight. Animals have a Height. Dog is an Animal. Dogs have a Name. Dogs have a Breed. Dogs have a DOB. Cat is an Animal Cats have a Name. Cats have 9 lives, so you need to keep track of the remaining lives once a cat dies. Bird is an Animal Birds have a wing span Birds have a canFly which is true or false (some birds cannot fly) Create a test class that creates one of each type of animal and displays the animal’s toString method. Submission Requirements: You must follow the rules from the prior assignments. UMLs and Design Tools are not required for this one. YOU MAY…