3. For which of the following would it be appropriate to use a class (circle the ones for which you should use a class)? (a) calculating the sum of all the integers up to a specified value (b) storing the information for a playing card and getting the blackjack value for the card (c) storing a street address, city, state, and zip code and printing a mailing address for it (d) determining the smallest of three numbers
Q: Image of size 1024 x 800 needs to resize to one that has 640 pixels width with the same aspect…
A:
Q: Algorithm for Testing semiregularity Input : a set S of generators of a nontransitive group G acting…
A: iven data Input : a set S of generators of a nontransitive group G acting on f~;Output : whether G…
Q: Explain Polygon Fill With Seed Fill Algorithm.
A: Introduction : Seed fill is an algorithm for filling a region of a given pixel with a certain color.…
Q: Golf scores record the number of strokes used to get the ball in the hole. The expected number of…
A: import java.util.Scanner; // Import the Scanner classpublic class Main{ public static void…
Q: 3. Determine the amount of total profit generated by the book purchased on order 1002. Display the…
A: ANSWER:-
Q: Question 04. We need to use synchronous TDM and combine 20 digital sources, each of 100 Kbps. Each…
A: Syncretic TDM: A synchronous TDM is just a way of setting up a computer network in which each device…
Q: Give a quick explanation of how USB ports allow consumers to charge their phones.
A: Introduction: USB ports enable the gadgets to connect to other devices that are compatible. You may…
Q: Simple peer-to-peer networks consist of only two computers communicating with each other via an open…
A: The solution is given in the next steps for your need
Q: The following program first reads an integer number 'number' assumed to be greater than zero entered…
A: - We need to solve the code missing parts problem.
Q: 1.4-6 Maximum end-end throughput (c). Consider the scenario below where 4 TCP senders are connected…
A: Below I have provided the solution of the given question
Q: Question 3. a) Consider the following language. Design a PDA to recognize the language. L={wwR| w E…
A: According to the information given:- We have follow the instruction in order to design a PDA to…
Q: Why do I keep getting this error? LabProgram.java:1: error: class, interface, or enum expected…
A: Please find the answer below :
Q: Implement algorithm Networ k F low (G, s,t) pre-cond: G is a network given by a directed graph with…
A: given data: pre-cond: G is a network given by a directed graph with capacities on the edges. s is…
Q: array Elite School Bus Services provide bus services for the route from point 0 to school as stated…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: The first version will use the first element of the array as the pivot. Please help me with a Java…
A: PROGRAM INTRODUCTION: Start the definition of a class that contains the definition of all the…
Q: Implement Embedded Style Sheets Example code.
A: Embedded Style Sheets Example:
Q: 5) Write a bash script using until loop that gets text input and displays it, and exits when text…
A: A bash script is a series of commands written in a file. These are read and executed by the bash…
Q: Truth tables typically display O a description of a repetition structure. O a description of an…
A: A truth table has one column for each input variable, such as P and Q, and one final column that…
Q: Define a recursive function createIntList for constructing a flat list of integers from a nested…
A: Answers:- def createIntList(lst): # the Display input list print("\n\tInput List :…
Q: Create a new table Courses_xxxx with following fields in correct data types. 1) cid: varchar(200),…
A: According to the information given :- We have to follow the instruction in order to create a new…
Q: Write Embedded Style Sheets Example code.
A: You may style your complete HTML document in one location with embedded style sheets. Put the…
Q: This is Python! Instruction: The TidBit Computer Store (Chapter 3, Project 10) has a credit…
A: The complete answer in python programming language is below:
Q: Write algorithm LargestShortestWeight(G, s,t) pre-cond: G is a weighted directed (augmenting)…
A: given data: pre-cond: G is a weighted directed (augmenting) graph. s is the source node.t is the…
Q: Please explain the the program each line.
A: Comments are added to each line of the code explaining what the line means OUTPUT screenshot is also…
Q: Justify the need for a frame size restriction in CSMA/CD and provide the bare minimum value that…
A: CSMA CD require a restriction on frame : By the time the start of a frame travels the whole width of…
Q: Answers ALL the questions. 1 Use the following Table to write the queries. Emp Infor Table EmpID…
A: Here is the complete solution of the above problem. See below steps.
Q: Let f(n) and g(n) be asymptotically positive functions. In the space provided, prove or disprove the…
A: accepted a negative vote It should be noted that f(n)f(n)+g(n)f(n)+g(n) and g(n)f(n)+g(n)f(n)+g…
Q: A transport layer is described for the OSI reference model.
A: OSI (Open Systems Interconnection Model) model A conceptual framework called the OSI Model (Open…
Q: The placeholder for the data type is placed immediately after the function name. The identifier…
A: Answer:
Q: Prove That The Scaling Operation Is Commutative.
A: Answer the above question are as follows
Q: How many different kinds of digital forensics resources are there? Describe the benefits and…
A: The numerous types of digital forensics tools include:- Operating Device Based Forensics 1. Based on…
Q: Where can I get information on SLA management for cloud computing?
A: Introduction: Service Level Agreement: A Service Level Agreement is a contract between Service…
Q: cript using while loop th
A: Dear Student, The bash script using while loop that gets text input and displays it, and exits when…
Q: When and how does a collision domain come into play?
A: A domain is a group of computers that may be accessed and controlled by following a common set of…
Q: Question 1) Design PDAs to recognize the following languages. (Note: The question asks for PDAs not…
A: PDAs:- PDAs, usually referred to as portable computers, are a type of mobile device that serve as…
Q: Write an SQL query to fetch the employees whose name begins with any two characters followed by a…
A: The SQL Query is given below with OUTPUT screenshot
Q: Question 2. Convert the following CFG to an equivalent CFG in Chomsky normal form. Show all your…
A: Given, S --> ABA --> aAA | εB --> bBB | ε
Q: It's important to talk about the benefits of these two Network+ certification schemes. Include…
A: Introduction: When applying for an IT job, you may be asked about CompTIA certifications. The trick…
Q: Q4 Draw a NFA for the regular expression 1. (a+b)c*cbb* 2. ab(abc)*ab
A: According to the information given:- We have to draw a NFA for the mentioned regular expression.
Q: Write a regular expression to search .dat file (s) having starting character "p" and ending with…
A: Regular Expression: ^p.*zw.dat$ In java, you can write it as: String regex = "^p.*zw.dat$"; In…
Q: Describe the variations between the stack's limited and unbounded implementations.
A: Introduction: A linear data structure called a stack adheres to a certain sequence for adding and…
Q: Write a string class. To avoid conflicts with other similarly named classes, we will call our…
A: C++ which refers to the general-purpose programming and coding language. C++ which it is used in…
Q: When exactly does antivirus software start to
A: There are six stages of the booting process: Start the input/output system at its most fundamental…
Q: When using the routing protocol, how many new networks have been found?
A: Routers must know the following to route packets: Routing protocols allow routers to communicate…
Q: Show The Format Of OpenGL Command.
A: Introduction OpenGL command: OpenGL command begins with the prefix GL & capitalizes the first…
Q: This is test review, e is the correct answer. I do not know why the else statement overrides the…
A: In step 2, I have provided answer with breif explanation----------------- In step 3, I have…
Q: Determine the minimum cost to provide library access to all citizens of HackerLand. There are n…
A: Algorithms: Step 1. START Step 2. Take input according to the requirements by the user Step 3.…
Q: There are a number of reasons why shift registers should make use of edge triggers.
A: Introduction: The flip flops are used to create registers. They serve as memory components and are…
Q: Context: Measuring Air Quality Levels of various air borne pollutants such as Nitrogen Monoxide…
A: The answer is given below.
Q: cache. Address: 2-way cache Block size: 2
A: The answer is
Step by step
Solved in 3 steps
- Please help with the following: C# .NET change the main class so that the user is the one that as to put the name in other words. Write a driver class that prompts for the person’s data input, instantiates an object of class HealtProfile and displays the patient’s information from that object by calling the DisplayHealthRecord, method. MAIN CLASS---------------------- static void Main(string[] args) { // Instance created holding 6 parameters which are field with value HealthProfile heartRate = new HealthProfile("James","Kill",1978, 79.5 ,175.5, 2021 ); heartRate.DisplayPatientRecord();// call the patient record method } CLASS HeartProfile------------------- public class HealthProfile { // attibutes which holds the following value private String _FirstName; private String _LastName; private int _BirthYear; private double _Height; private double _Weigth; private int _CurrentYear; public HealthProfile(string firstName, string lastName, int birthYear, double height, double wt, int…solve with java Create a class for Subject containing the Name of the subject and score of the subject. There should be following methods: set: it will take two arguments name and score, and set the values of the attributes. If score is less than 0 or greater than 100.0 then a message should be displayed “Incorrect score” and score should be set to Zero. set: it will take one double value as argument and set the value of score only. If score is less than 0 or greater than 100.0 then a message should be displayed “Incorrect score” and score should be set to Zero. display: it will display the name and score of the subject. Like “Name : Math, Score: 99.9” getScore: it will return the value of score. greaterThan: it will take subject’s object as argument, compare the calling object’s score with argument object’s score and return true if the calling object has greater score. Create a class “Main” having main method to perform following tasks. Create two objects of Subject class having…#Python IDLE: #Below is my Pizza class ,how would I write the function described in the attached image,based on this class? # The Pizza class should have two attributes(data items): class Pizza: # The Pizza class should have the following methods/operators): # __init__ - # constructs a Pizza of a given size (defaults to ‘M’) # and with a given set of toppings (defaults to empty set). def __init__(self, size='M', toppings=set()): self.size = size self.toppings = toppings # setSize – set pizza size to one of ‘S’,’M’or ‘L’ def setSize(self, size): self.size = size # getSize – returns size def getSize(self): return self.size # addTopping – adds a topping to the pizza, no duplicates, i.e., adding ‘pepperoni’ twice only adds it once def addTopping(self, topping): self.toppings.add(topping) # removeTopping – removes a topping from the pizza def removeTopping(self, topping):…
- Please code in python Create a program with two classes – the person class and the student The person class has the following properties: first name (first_name), last name (last_name) street address (address) city (city) zip code (zip) The class has the following methods: get_full_name, which returns the full name of a person get_full_address, which return greeting, returns a greeting message. The class should provide accessor and mutator for each property The class should override the __str__ method to return the state of the object. Create a child class called student which has a property named graduation year (graduation_year) and major. Provide accessor and mutator for each property of its own It inherits all the properties and methods of the person parent class as well. Create a test program that Create an object of the person class and print the full name of a person. Create an object of the person class and print…Q3 attached in the image with the table 1 if you want to recreate code then you can Question Write code for an Invoice class for a car sale. Printing an object of the Invoice should print thedetails about the seller, the buyer, the dealer, the date of transaction, the car being sold, the purchase and selling price, the commission earned by the dealer, sales tax, and the total price of the car (calculated given the details in Question 3 part 3). A generation of the invoice object should set the isSold variable of the car class to true. You do not need to write code for any other classes 3.) Syntax of the code is given below: import java.util.*; class Car{ //class car String[] name; int reg_number,eng_number, chassis_num,status; String[] city, model, color, date_reg,date_arr,type; float price; float abstract calculate (float price); } class Dealer extends Car{ //inherits from Car String[] deal_name, deal_id, deal_add, deal_pno; float dealer_com ;…Object Oriented Programming: 213COMP, 214COMP (Feb-2022) Assignment- I [10 marks] Academic honesty: O Only pdf file accepted & student ID, will be your upload file. O Student who submit copied work will obtain a mark of zero. O Late work or attach file by email message not allowed. Q1: Write the signature for a method that has one parameter of type String, and does not return a value. Q2: Write the signature for a method that has two parameters, both of type Student, and returns an int value. Q3: Write the constructor's headers of the followings? new Student (202101156, “Ahmed"); new Address(51, "jazan university","CS&IT" ); new Grade(true, 505235600, 4.5); Q4: a) Write a class Student that define the following information: name, stid , age. b) Explain a mutators (setters) and accessors(getters) methods for each attributes(fields). c) Add three constructors: • with empty constructor. one parameter constructor (name of student) two parameters constructor (name and stid) d) Create two…
- Course Title: Modern Programming Language Please Java Language Code Question : Create a class called with your 18Arid2891, as Invoice18Arid2891, that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables a part number (type String), a part description (type String),a quantity of the item being purchased (type int) and a price per item (double). Your class should have a constructor that initializes the four instance variables. Provide a set and a get method for each instance variable. In addition, provide a method named getInvoice Amount that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a double value. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0.0. Write a test application named InvoiceTestMJibranAkram that demonstrates class Invoice’s…Make C# (Sharp): console project named MyPlayList. Create an Album class with 4 fields to keep track of title, artist, genre, and copies sold. Each field should have a get/set property. Your Album class should have a constructor to initialize the title (other 3 variables should default to null or 0). In addition, create a public method in the Album class to calculate amount sold for the album (copies sold * cost_of_album). You determine the cost of each album. Also create a method in the Album class to display the information. Print out of information should look something like this: The album Tattoo You by the Rolling Stones, a Rock group, made $25,000,000. In the main method, create 3 instances of the Album class with different albums, use setters to set values of the artist, genre, and copies sold. And then use getters to display information about each on the console.Using classes, design an online address book to keep track of the names, addresses, phone numbers, and dates of birth of family members, close friends, and certain business associates. Your program should be able to handle a maximum of 500 entries. Define a class addressType that can store a street address, city, state, and ZIP code. Use the appropriate functions to print and store the address. Also, use constructors to automatically initialize the member variables. Define a class extPersonType using the class personType (as defined in Example 10-10, Chapter 10), the class dateType (as designed in this chapters Programming Exercise 2), and the class addressType. Add a member variable to this class to classify the person as a family member, friend, or business associate. Also, add a member variable to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialize the member variables. Define the class addressBookType using the previously defined classes. An object of the type addressBookType should be able to process a maximum of 500 entries. The program should perform the following operations: Load the data into the address book from a disk. Sort the address book by last name. Search for a person by last name. Print the address, phone number, and date of birth (if it exists) of a given person. Print the names of the people whose birthdays are in a given month. Print the names of all the people between two last names. Depending on the users request, print the names of all family members, friends, or business associates.
- A(n) ____________ is one instance or variable of a class.Use Python Programming Language (The Stock class) Design a class named Stock to represent a company’s stock that contains: A private string data field named symbol for the stock’s symbol. A private string data field named name for the stock’s name. A private float data field named previousClosingPrice that stores the stock price for the previous day. A private float data field named currentPrice that stores the stock price for the current time. A constructor that creates a stock with the specified symbol, name, previous price, and current price. A get method for returning the stock name. A get method for returning the stock symbol. Get and set methods for getting/setting the stock’s previous price. Get and set methods for getting/setting the stock’s current price. A method named getChangePercent() that returns the percentage changed from previousClosingPrice to currentPrice. Write a test program that creates a Stock object with the stock symbol INTC, the name Inte lCorporation, the…Using c ++ write a class named Reservation with the following features and functionality. • Flight number Passenger name • Reservation number Number of passenger baggage • Type the method that prints the reservation information on the screen.