va Program
Q: a as programming language
A: Given :
Q: Computer science Short answer What makes up the implementation of an ADT?
A: let us see answer:- Introduction:- Abstract Data Type (ADT) is a type of data for which only…
Q: Q6: Convert the attached C++ program to JAVA program .
A: public class Bank { //declaring instance variables private double deposit; private double interest;…
Q: How to draw a rose in c ++ computer graphics
A: C++ program to draw Rose :- #include <iostream>#include…
Q: Data Flow Diagram Required: FLOWCHART and java program
A: Given: Data Flow Diagram Required: FLOWCHART and java program
Q: What details regarding the Python programming language do you have?
A: Programming language Python A high level programming language is Python. It is frequently used in…
Q: The Python programming language has a wide range of uses.
A: Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.…
Q: Explain go language of programming.
A: Go (also called Golang or Go language) is an open source programming language which is used for…
Q: C programming Topic: Stacks
A: program
Q: How memory is handled in the Python programming language.
A: The complete answer is given below
Q: write a java program
A: According to the question below the complete Program: Program Output:
Q: Using Java programming language do the following:
A: public class Deterministic {int[ ][ ] next, start, abStates, abLetters;Partition final;Alphabet…
Q: Describe a computer's language.
A: A computer language is described because the code or syntax used to put in writing packages or…
Q: The Python programming language's approach to memory.
A: Intro *) Python uses non-object memory and a portion of the RAM for internal purposes. Python…
Q: c# WPF and Java! List at least 2 ways that performing actions in WPF and Java Editor are the SAME.…
A: We need to list at least 2 ways that performing actions in WPF and Java Editor are the SAME and at…
Q: Java program
A: Code: import java.util.Scanner; public class WordCounter {//class name static int…
Q: Write a program to implement DFA
A: DFA: DFA stands for Deterministic Finite Automata. It is a collection of 5-tuples. Q - Finite set of…
Q: Describe the language of a computer.
A: Computer language A computer language includes various languages that are used to communicate with…
Q: In Assembly Language, how are variables represented?
A: Introduction: The assembly language programmer must understand how the hardware implements these…
Q: Simple C program for Library System
A: According to the asked question, the solution is given below with a proper explanation.
Q: Define program in computer.
A: Definition of program in computer is as follows:
Q: Write assembly program
A: According to the question we have to write an assembly program that prompts the user to enter a…
Q: java programing
A: Required: Note: Please mention your specific requirement for the program. what do you want the…
Q: Describe the programming paradigm of a bag of tasks.
A: Answer: bag of the tasks programming model. Bag of words is a model used in machine learning which…
Q: Java Program(OOP)
A: class pet{ string name; string gender; string sound }; class dog::pet{ sound="woof"; };
Q: python not java please
A: START define the function func() with parameter of value 'n' if n is 1, then return 1 else, return n…
Q: You can use C# or C++ language for implementation
A: C++ implementation : virtual member method allows the implementation of methods which is according…
Q: Acme java code
A: Digital certificate management is complex and can be challenging to manage effectively without the…
Q: Java code Example Input: 4 1 1 2 2 Output: 72
A: Here is the detailed and simplified JAVA code for the above listed problem statement:
Q: Q3: Explain different Control statements used in programming language. ( fo)
A: Solution : The types of control statements in programming language : If statementsSwitch…
Q: java output :
A: Correct Answer: b
Q: We need to use the java language
A:
Q: java program :
A: Given keys: 50, 46, 27, 16, 41, 31. Given that hash table size = 9. Therefore, the index ranges…
Q: java program?
A: Given :- The Java code is mention in the above given question Need to find out the member, static…
Q: Java Program What is the output of this problem
A: In step 2, I have provided correct option with brief explanation------- In further steps , I…
Q: e description language (HDL) is
A: Design: Description: Descriptive language counts motive, aesthetic price, and emotion to…
Q: java program
A: Given : - The concept of half life for first order reaction using java programming language as…
Q: How memory is managed in python.
A: Memory allocation can be defined as allocating a block of space in the computer memory to a program.…
Q: Subject is C++ programming
A: Lets see the solution.
Q: How to code for user input in Java programming language?
A: In Java Programming Language, The scanner class is used to get user input.
Q: Explain Java Virtual Machine.
A: Java Virtual Machine is a stack-based abstract computing machine. It was designed to support Java.…
Q: Use Java program
A: Java code: import java.util.Scanner;public class Mark_Main { int n; int marks[]; int total;…
Q: What distinguishes testing and debugging of computer programs?
A: Given: Let's examine the distinction between debugging and testing computer programmes. software…
Q: Write a Java Program
A: The answer to the following question:-
Q: Java program
A: The question is based on the loop. The basic concept is about creating a two dimension array of the…
Q: JAVA program
A: Taking two positive integers an as user input Need to compute :- the value of x^2 + y^2 = ?…
Subject: Java
Step by step
Solved in 3 steps
- 1. Create a class called Student, with the following attributes/variables:a. studentName (String)b. studentNumber (int)sc. regYear(long)d. faculty(String)e. department(String)2. Add the following methods in Student:a. accessors and mutators for all variablesb. toString methodi. Formulate your toString so that it only shows studentName,studentNumber and faculty3. Create a class called MyFriends, with the following attributes variables:a. studentArray(Student[])4. Add the following methods in MyFriends:a. fillArrayi. Using scanner ask how many students does the user want to inputii. Capture user input for all of his friends(Of course we are assuming all your friends would be similarUWC students, go ask around and meet new friends, alsopreferably not in the same Computer Science department … ifpossible … only if possible)b. maini. Call the fillArray methodii. Count how many Computer Science studentsiii. If half or more students are Computer Science students, thendisplay “You … need more…Solve B please(A) Write a class called Course having data members: courseNum (String such as ITCS214), courseName (String such as Data Structures), credits (int), section (int). Include the following public methods in the class: Default constructor (without any parameters), constructor with 4 parameters, set and get methods for all attributes, equals and toString methods (B) Write a class called Student having following data fields: idNum (long), firstName (String), lastName (String), gender (char), email (String), coursesRegistered (ArrayList of type Course). Note that coursesRegistered is a list of type ArrayList (Java class) in which each element is of class type Course. The coursesRegistered is the list of courses in which the student is currently registered. It has following methods: Default constructor (without any parameters), constructor with 5 parameters (except for coursesRegistered), set and get methods for all attributes, equals, and printCoursesRegistered. The list…Create a class Course, which has one field: String courseName Create the constructor, accessor, and mutator for the class. Then, in the main method of this class, create an instance of the class with the name "CST1201". Write an equivalent while statement to replace the following for statement for (int i=2; i<100; i=i+2) { System.out.println(i); }
- Create a class called Employee as a a derived class of the class Person. An employee record has an employee's name, address, gender(inherited from the class Person), an ID number whose type is String, an annual salary represented as a single value of type double, and a year the employee started work as a single value of type int. Your class should have a reasonable number of constructors and setter methods, as well as getter methods. Create another class containing a main method to fully test your class definition.Create a class called Employee as a a derived class of the class Person. An employee record has an employee's name, address, gender(inherited from the class Person), an ID number whose type is String, an annual salary represented as a single value of type double, and a year the employee started work as a single value of type int. Your class should have a reasonable number of constructors and setter methods, as well as getter methods. Create another class containing a main method to fully test your class definition. programming language to be used is javaQI. Write a program in BlueJ using the following hints. 1. Create a class named Book and declare the fields author, title and pages with suitable field types. 2. Declare the constructor and initialize the fields author and title with the assigned constructor parameter. 3. Name the constructor parameter as your own. 4. Add two accessor methods to the class getAuthor, getTitle and getPages—that return the author and title fields as their respective results. Add mutator method to change the pages of the Book class. 5. Add two methods, printAuthor and printTitle, to this Book class project. These should print the author and title fields, respectively, to the terminal window.
- Write a program named SalespersonDemo that instantiates objects using classes named Real EstateSalesperson and GirlScout. Demonstrate that each object can use a SalesSpeech() method appropriately. Also, use a MakeSale() method two or three times with each object, and display the final contents of each objects data fields. First, create an abstract class named Salesperson. Fields include first and last names; the Salesperson constructor requires both these values. Include properties for the fields. Include a method that returns a string that holds the Salespersons full name—the first and last names separated by a space. Then perform the following Create two child classes of Salesperson: Real EstateSalesperson and Girl Scout. The Real EstateSalesperson class contains fields for total value sold in dollars and total commission earned (both of which are initialized to 0), and a commission rate field required by the class constructor. The Girl Scout class includes a field to hold the number of boxes of cookies sold, which is initialized to 0. Include properties for every field. Create an interface named ISell able that contains two methods: SalesSpeech() and MakeSale(). In each Real EstateSalesperson and Girl Scout class, implement SalesSpeech() to display an appropriate one- or two-sentence sales speech that the objects of the class could use. In the Real Estatesalesperson class, implement the MakeSale() method to accept an integer dollar value for a house, add the value to the Real EstateSalespersons total value sold, and compute the total commission earned. In the Girl Scout class, implement the MakeSale() method to accept an integer representing the number of boxes of cookies sold and add it to the total field.a. Write a FractionDemo program that instantiates several Fraction objects and demonstrates that their methods work correctly. Create a Fraction class with fields that hold a whole number, a numerator, and a denominator. In addition: Create properties for each field. The set access or for the denominator should not allow a 0 value; the value defaults to 1. Add three constructors. One takes three parameters for a whole number, numerator, and denominator. Another accepts two parameters for the numerator and denominator; when this constructor is used, the whole number value is 0. The last constructor is parameterless; it sets the whole number and numerator to 0 and the denominator to 1. (After construction, Fractions do not have to be reduced to proper form. For example, even though 3/9 could be reduced to 1/3, your constructors do not have to perform this task.) Add a Reduce() method that reduces a Fraction if it is in improper form. For example, 2/4 should be reduced to 1/2. Add an operator+() method that adds two Fractions. To add two fractions, first eliminate any whole number part of the value. For example, 2 1/4 becomes 9/4 and 1 3/5 becomes 8/5. Find a common denominator and convert the fractions to it. For example, when adding 9/4 and 8/5, you can convert them to 45/20 and 32/20. Then you can add the numerators, giving 77/20. Finally, call the Reduce() method to reduce the result, restoring any whole number value so the fractional part of the number is less than 1. For example, 77/20 becomes 3 17/20. Include a function that returns a string that contains a Fraction in the usual display format—the whole number, a space, the numerator, a slash (D, and a denominator. When the whole number is 0, just the Fraction part of the value should be displayed (for example, 1/2 instead of 0 1/2). If the numerator is 0, just the whole number should be displayed (for example, 2 instead of 2 0/3). b. Add an operator*() method to the Fraction class created in Exercise 11a so that it correctly multiplies two Fractions. The result should be in proper, reduced format. Demonstrate that the method works correctly in a program named FractionDemo2. c. Write a program named FractionDem03 that includes an array of four Fractions. Prompt the user for values for each. Display every possible combination of addition results and every possible combination of multiplication results for each Fraction pair (that is, each type will have 16 results).Create a class called Employee as a a derived class of the class Person. An employee record has an employee's name, address, gender(inherited from the class Person), an ID number whose type is String, an annual salary represented as a single value of type double, and a year the employee started work as a single value of type int. Your class should have a reasonable number of constructors and setter methods, as well as getter methods. Write another class containing a main method to fully test your class definition.
- Create a parent class Person with one attribute age and one method greet() that prints out "Hello, world!". By default, the age is 20. Then create a subclass CollegeStudent that inherits from Person and has its own attributes School_Name and Major. Then create an object (a college student, his name is Harry, age is 21, School_Name is "Felician University", and Major is "Computer Science"), then let Harry say"Hello World!".????????: Design TomCruise class and DulquerSalman class which inherit from Actor class so that the following code provides the expected output. You can not change any of the given code. Do not modify the given parent class. Note: add_movie() method in both child classes should work for any number of parameters and assume parameters will be even numbers. class Actor: def __init__(self, name, rating, industry): self.name = name self.rating = rating self.industry = industry def add_movie(self, *info): pass def __str__(self): s = f"Name: {self.name}\nRating: {self.rating}\nIndustry: {self.industry}" return s # Write your codes here. tom_cruise = TomCruise("Tom Cruise", 9.5, "Hollywood", 0) tom_cruise.add_movie("Knight & Day", "Action", "Top Gun", "Action", "Jerry Maguire", "Romance", "Jack Reacher", "Thriller", "The Firm", "Thriller") print('1.------------------------------------') print(tom_cruise.oscar_status())…Create a class named 'Member' having the following members:Data members1 - Name2 - Age3 - Phone number4 - Address5 - SalaryIt also has a method named 'printSalary' which prints the salary of the members.Two classes 'Employee' and 'Manager' inherits the 'Member' class. The 'Employee' and 'Manager' classes have data members 'specialization' and 'department' respectively. Now, assign name, age, phone number, address and salary to an employee and a manager by making an object of both of these classes and print the same.