address book entry and name it AddressBook. a.The table below describes the information that an address book entry has. Attributes/Field Description Name Name of the person in the address book Address Address of the person Mobile Number Mobile number of the person
Q: Omantel plans to have an automated bill calculation. Ahmed is asked to write a class program in Java…
A: import java.util.*;import java.lang.*;import java.io.*; class MobileBill{ int civilId; double…
Q: 1. Create a class named Employee and create fields to store the following information. Employee ID…
A: Java program to form above Employee class and given questions
Q: Create a class Employee with the attributes Employee Id, Employee Name and Basic Salary, Bonus,…
A: Class is a user-defined data type used to create our own data types. The Employee is a class that…
Q: Question 4 The answer to this question is divided into two parts. Please write your answer below…
A: (Question no 4) Programs : Note: To better understand the code please see the screenshot of the…
Q: Create a class called Student with the following details: *Three data fields M1, M2 and M3 of…
A: We need to write a program which has a class of Student. The class has 3 variables M1, M2, and M3 of…
Q: I've posted this question several times. T-T) huhu... i just need the source code in java language.…
A: 1. The code for the first question is as follows: class Details { String name, address;…
Q: Create a class Customer with following characteristics and use all concepts which you have…
A: Note: Below is the required program in the Java language. Program Approach: Importing a necessary…
Q: Create a class called Internet for performing internet providers. Use character variables to…
A: JAVA Code : public class Internet { String Provider; // String type for Provider name int…
Q: Write a class named Car that has the following data attributes in pyton: a. __year_model (for the…
A: PROGRAM EXPLANATION: Create a class car. Define the init method and define all the instance…
Q: Question 3 (a) Design a class named Point with two private attributes x and y of type int for the…
A: According to the information given:- We have to follow the instruction in order to get desired…
Q: Assignment - Locations For this assignment, we will be creating our location class and then a few…
A: Due to complexity of the question we have attempted a partial answer to your question outlining the…
Q: Write a code to copy all the details of that employee from one object to another object.
A: Program: // C++ Version 14#include<iostream>using namespace std;// Class declarationclass…
Q: Which of the below is a valid constructor for the class Animal? The attributes of the Animal class…
A: Constructor is a special method in java. It should be the same name of class. The constructor…
Q: Write a class named Car that has the following data attributes: . __year_model (for the car's year…
A: Algorithm: 1. Take self input car year, make and current speed. 2. Take self speed of 5. 3. Take…
Q: "Make a class called Animal. Create two attributes called name and year, and then create several…
A: C++ code: #include<iostream>using namespace std; //create a class lengthclass Animal {…
Q: Create a class named Person with three attributes (name, age, address) and provide a constructor to…
A: Java code for the given scenario is as follows: class Person { String name; int age; String…
Q: Create a class called Internet for performing internet providers. Use character variables to…
A: Actually, program is a executable software that runs on a computer.
Q: Given that Employee is a class, how many reference variables and objects are created by the…
A: Brief about the question: The question is based on the java class and object concept like we have…
Q: Write the definition of a class named WeatherForecast that has the following methods: • An_init_…
A: The Answer start from step-2.
Q: Write a class named Car that has the following data attributes: _ _year_model (for the car’s year…
A: Given:- Write a class named Car that has the following data attributes: _ _year_model (for the…
Q: Create a class named State that holds the following fields: a String for the name of the state, an…
A: // defination for TestStatepublic class TestState { public static void main(String[] args) {…
Q: 1. Create a class named Book and declare the fields author, title and pages with suitable field…
A: Note: Since no specific programming language is mentioned, the program has been implemented in Java…
Q: Write and document the definition for the Product class. The Product class represents an item that…
A: Programming instructions: Create a class Product. Create required instance variables. Create a…
Q: Create a class JobApplicant that holds data about a job applicant. Include a name and four boolean…
A: Since the programming language is not mentioned , I have done the code in Java. Algorithm : Step 1…
Q: Let’s assume you are creating a game where multiple players are involved. You will create a Player…
A: Given: Let’s assume you are creating a game where multiple players are involved. You will create a…
Q: 1) Define a Person class containing two private attributes: last name, first name. Provide this…
A: As per our guidelines, we are supposed to answer only 1st three parts. Kindly repost the remaining…
Q: Create the four data classes as diagram shown on the picture attached. Dont add any attributes or…
A: Ship.java public class Ship{ //instance variables private String name; private int year; private…
Q: Create a Vehicle class for keeping current set of coordinates and calculating the distance to new…
A:
Q: Create an abstract Student class for Parker University. The class contains fields for student ID…
A: public abstract class Student{ private String id; private String lastName; protected double…
Q: Part 1: You have been hired by a retro game shop to develop a digital inventory system for their…
A: As it is instructed that there is no need to create the driver class for part 1 so, I am not…
Q: 1.Write a class named Car that has the following data attributes: (a.) __year_model (for the car’s…
A: Code: class Car:def __init__(self,model,make): #init methodself.__year_model = model #data…
Q: e. Create MyOwnAutoShop class which contains the main() method. Perform the following within the…
A: Given:
Q: QI/ write a program to define a class called Facebook that has the properties personName and…
A: The program is made with object-oriented approach. Class name is Facebook which holds the properties…
Q: Create a class named Rock that acts as a superclass for rock samples collected and catalogued by a…
A: The main objective of the program is to create five java classes namely as below Rock.java…
Q: 1. Design a class named Videotape with the following: o title data field from type String and…
A: Given:
Q: Next, create class Lab14A with a main method or driver which should do the following: Create two…
A: The program for the above given question is given below:
Q: Define a class called dateType, to store person's date of birth. The structure of the class should…
A: Here I have created a class named dateType. In this class, I have created variables to store the…
Q: Define a Person class containing two private attributes: last name, first name. Provide this class…
A: Actually, program is an executable software that runs on a computer.
Q: Design and Implement a classdateTypethat manages a calendar. The class dateType should store day,…
A: // C++ code: //include necessary header files#include <iostream>#include…
Q: My professor has given me additional information for this question: Create a class named…
A: Objective: This program creates an application for the College courses along with several…
Q: Create a class named House with the 3 attributes named price, location and builtYear of type double…
A: In java, For each instance variable, a getter method returns its value while a setter method sets…
Q: Create a class called Internet for performing internet providers. Use character variables to…
A: Actually, program is a executable software that runs on a computer.
Q: Write a constructor in the Car class given below that initializes the attribute brand with the…
A: Create an array and all the 3 objects in the array will be the instances created using default…
Q: The Rockford Daily Clarion wants you to design a class named Issue. Fields include the issue number,…
A: Solution approach - A default constructor that sets the problem number to 1 and the other fields…
Q: Question # 1: Create a class with following attributes: • The car's make • The car's model • The…
A: class Car { //private data memeber of class private String make; private…
Q: Create a class that contains an address book entry and name it AddressBook. The table below…
A: AddressBook class: class AddressBook{ // Attributes private String Name, Address,…
Q: The Customer class In the context of our problem domain, what must the Custoner class know? The…
A: public class Customer{ private String name; private String address; private String telNo;…
Q: You are designing a program that will keep track of the boxes in a doctor’s office. Each box will…
A: You are designing a program that will keep track of the boxes in a doctor’s office. Each box will…
Q: Hello this is for my Java class project, thank you in advance Create the four data classes as…
A: Note: As you have asked multiple methods, as per our policy, we will solve the first part of your…
Q: Create the class Student, which must have a normal constructor and at least 5 attributes…
A: The problem is based on making class in java programming language with attributes.
- Create a class that contains an address book entry and name it AddressBook.
a.The table below describes the information that an address book entry has.
Attributes/Field |
Description |
Name |
Name of the person in the address book |
Address |
Address of the person |
Mobile Number |
Mobile number of the person |
Email Address |
Email address of the person |
b.The class definition should contain the following:
- Attributes
- Constructor
- Accessors and mutators
Test Stem / Question |
Choices |
1: How many attributes should be defined in AddressBook class? |
A: 1 |
B: 2 |
|
C: 3 |
|
D: 4 |
|
E: None of the above |
|
2: How many accessors should be defined in AddressBook class? |
A: 1 |
B: 2 |
|
C: 3 |
|
D: 4 |
|
E: None of the above |
|
3: How many mutators should be defined in AddressBook class? |
A: 1 |
B: 2 |
|
C: 3 |
|
D: 4 |
|
E: None of the above |
|
4: What is the name of the Constructor? |
A: AddressBook |
B: AddressBook() |
|
C: public AddressBook |
|
D: None of the above |
|
5: How do you create an instance of AddressBook class? |
A: AddressBook addressBook; |
B: addressBook addressBook = new addressBook(); |
|
C: addressBook addressBook = new addressBook; |
|
D: None of the above |
the following questions will be uploaded.
Step by step
Solved in 2 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…Creates a class called CourseClass with 6 attributes: a. name: the course name; b. maxStud: a maximum number of Student into the CourseClass; c. nbStud: the current number of Student into the CourseClass. When a CourseClass is created, the number nbStud is equal to 0; d. Student Stud[]: an array of Student. The size of this array is equal to maxStud; e. CourseTeacher: the Teacher (of type Teacher) responsible of this course; f. LabTA: The TA (of type TA) responsible of the course's Lab; Add the following methods: e. Constructor: able to create a CourseClass with maximum 10 Students; f. overload the operator += (Student): able to add a Student to the CourseClass. The Student will be added to the Stud array. You need to be sure that an available space exits (uses the function assert); g. find(StudentName): this method allows to find a Student by his Name. If it exists, the Student will be displayed, else, am error message will be displayed; h. display: this method aims to display all…Write a class, XXXX_TestVehicle, which does the following:1. Creates one Car object from information entered by the user.2. Creates one Truck object from information entered by the user.3. Creates an Array of Vehicles that can hold 10 objects.4. It creates up to 10 Vehicles objects from information entered by the user
- Java question please Create a class called Account that has the following attributes: Account Client - AccountHolder Double - Balance Date - DateCreated Account() Account(Client AccountHolder, Double Balance) getAccountHolder() - Client setAccountHolder(Client) - void getBalance() - Double deposit(Double) - Double withdrawal(Double) - Double getDateCreated() - Date toString() - String compareTo(Account) - Integer equals(Account) - Double Notes: The account holder attribute will link to the Account class that you created in problem 6. Your constructor and overloaded constructor should set the date created to the current date. Your deposit method should add to the balance Your withdrawal method should remove from the balance, as long as there is enough money to withdrawalPlease provide JAVA source code for following assignment. Please attach proper comments and read the full requirements. The local Driver’s License Office has asked you to write a program that grades the written portion of the driver’s license test The test has 20 multiple choice questions. Here are the correct answers: B D A A C A B A C D B C D A D C C D D A A student must correctly answer 15 of the 20 questions to pass the exam. Write a class named Drivertest that holds the correct answers to the test in an array field. The class should also have an array field that holds the student’s answers. The class should have the following methods: passed. Returns true if the student passed the test, or false if the student failed totalCorrect. Returns the total number of correctly answered questions totalIncorrect. Returns the total number of incorrectly answered questions questionsMissed. An int array containing the…Create AutomaticCar class that shall have private model, year, speed and gear attributes. Encapsulate complete state and expose the state for read/write (where it makes sense and needed). As its automatic car, so other shall not be able to update the gear attribute directly. The gear would auto change based on speed and other parameters (defined below). The speed range for different gears is (gear : speed-range) 0:0 1:1-100 2:101-200 3:201-300 4:301-400 5:401-500. The speed should not be updated if a -ve value is passed to its set method, in such cases, it shall print an appropriate error message. If car's earlier speed was 50 and set method is called with argument 20, the car speed would become 20, not 70. Please note, same method would be used to increase and decrease the speed, depending on whether the earlier speed was lower or higher as compared to new value passed. Here are some further points/rules that you must implement: Make LuckyRacer class, in its main method, create 5…
- Creates a class called College with 6 attributes: a. maxStud: a maximum number of Student into the college; b. nbStud: the current number of Student into the college. When a College is created, the number nbStud is equal to 0; c. Student Stud[]: an array of Student. The size of this array is equal to maxStud; d. maxPhdStud: a maximum number of PhDStudent into the college; e. nbPhdStud: the current number of PhDStudent into the college. When a College is created, the number nbPhDStud is equal to 0; f. Student PhdStud[]: an array of PhDStudent. The size of this array is equal to maxPhdStud. Add the following methods: a. add(Student): able to add a Student to the College. The Student will be added to the Stud array if there are an available space; b. overload the operator += (PhDStudent): able to add a PhDStudent to the College. The PhDStudent will be added to the PhdStud. You need to be sure that an available space exits (uses the function assert ); c. find(supervisorName): this method…Please, I want to modify the code so that the user can add the employee's name, number and specialization, and use for loob He must add more than one employee. When he finishes adding the employee’s data, he asks the user: Do you want 1-Print the data 2-Add a new employee 3-Exit class Doctor:"""Represents a Doctor""" #initializer with specialization default to "general"def __init__(self, Id, name, specialization="general"):#attributesself.Id = Idself.name = nameself.specialization = specialization.lower() #initializing salary to 25000, basic salaryself.salary = 25000 #incrementing salary based on specialization#if specialization is pediatric, increasing salary by 10%if specialization == "pediatric":self.salary += self.salary*10/100 #if specialization is dental, increasing salary by 15%elif specialization == "dental":self.salary += self.salary*15/100 #str() functiondef __str__(self):return (f"Id: {self.Id} \n"f"Name: {self.name} \n"f"Specialization: {self.specialization} \n"f"Salary:…This is the question that is confusing me - A. Create a CollegeCourse class. The class contains fields for the course ID (for example, CIS 210), credit hours (for example, 3), and a letter grade (for example, A). Include get and set methods for each field. Create a Student class containing an ID number and an array of five CollegeCourse objects. Create a get and set method for the Student ID number. Also create a get method that returns one of the Student’s CollegeCourses; the method takes an integer argument and returns the CollegeCourse in that position (0 through 4). Next, create a set method that sets the value of one of the Student’s CollegeCourse objects; the method takes two arguments—a CollegeCourse and an integer representing the CollegeCourse’s position (0 through 4). B. Write an application that prompts a professor to enter grades for five different courses each for 10 students. Prompt the professor to enter data for one student at a time, including student ID and course…
- Please help with the following question: Rewrite the following code by removing Integer.parseInt public class javaapplication1 { /*** @param args**/public static void main(String[] args) {Scanner sc=new Scanner(System.in);//create 3 Department instancesSystem.out.println("Enter Department 1 name and ID: ");Department d1=new Department(sc.nextLine(), Integer.parseInt ( sc.nextLine()));System.out.println("Enter Department 2 name and ID: ");Department d2=new Department(sc.nextLine(), Integer.parseInt( sc.nextLine()));System.out.println("Enter Department 3 name and ID: ");Department d3=new Department(sc.nextLine(), Integer.parseInt( sc.nextLine()));//create 5 StudentsSystem.out.println("Enter Student 1 Id, Name and Dept ID");Student s1=new Student(Integer.parseInt(sc.nextLine()),sc.nextLine(),Integer.parseInt(sc.nextLine()));System.out.println("Enter Student 2 Id, Name and Dept ID");Student s2=new…This is the question I am stuck on - A. Create a CollegeCourse class. The class contains fields for the course ID (for example, CIS 210), credit hours (for example, 3), and a letter grade (for example, A). Include get and set methods for each field. Create a Student class containing an ID number and an array of five CollegeCourse objects. Create a get and set method for the Student ID number. Also create a get method that returns one of the Student’s CollegeCourses; the method takes an integer argument and returns the CollegeCourse in that position (0 through 4). Next, create a set method that sets the value of one of the Student’s CollegeCourse objects; the method takes two arguments—a CollegeCourse and an integer representing the CollegeCourse’s position (0 through 4). B. Write an application that prompts a professor to enter grades for five different courses each for 10 students. Prompt the professor to enter data for one student at a time, including student ID and course data for…This is the question I am stuck on - A. Create a CollegeCourse class. The class contains fields for the course ID (for example, CIS 210), credit hours (for example, 3), and a letter grade (for example, A). Include get and set methods for each field. Create a Student class containing an ID number and an array of five CollegeCourse objects. Create a get and set method for the Student ID number. Also create a get method that returns one of the Student’s CollegeCourses; the method takes an integer argument and returns the CollegeCourse in that position (0 through 4). Next, create a set method that sets the value of one of the Student’s CollegeCourse objects; the method takes two arguments—a CollegeCourse and an integer representing the CollegeCourse’s position (0 through 4). B. Write an application that prompts a professor to enter grades for five different courses each for 10 students. Prompt the professor to enter data for one student at a time, including student ID and course data for…