delete a linked list node Computer Science Assignment Help

delete a linked list node Computer Science Assignment Help. delete a linked list node Computer Science Assignment Help.


(/0x4*br />

i wrote a code but i am not sure and my assignment is due today by midnight. if you do correction i appreciate.

#include <iostream>

using namespace std;

struct node {

int value;

node *next;

};

void insertAtEnd(node * list1);

void insertBetween(node * List1, int a, int b);

node* delete_first(node * root);

void delete_last();

void delete_position(node * root, int pos);

int main() {

node *root = new node;

node *current = new node;

current = root;

int inputValue = 0;

cout << “Enter no: “;

cin >> inputValue;

node *temp = new node;

temp->value = inputValue;

temp->next = NULL;

root = temp;

current = temp;

//BUILD LINKED LIST

do {

cout << “Enter no: “;

cin >> inputValue;

node *temp = new node;

temp->value = inputValue;

temp->next = NULL;

current->next = temp;

current = current->next;

} while (current->value != 0);

root = delete_first(root);

//PRINT LINKED LIST – TRAVERSE

current = root;

cout << endl << “Now printing the linked list…” << endl;

do {

cout << current->value << ” “;

current = current->next;

} while (current->next != NULL);

cout << endl << “Print complete.”;

int a;

cin >> a;

getchar();

return 0;

}

void insertAtEnd(node * list1) {

node *current = list1;

int inputValue = 0;

do {

if (current->next->next == NULL) {

current = current->next;

cout << endl << “Enter Value to new node: “;

cin >> inputValue;

node*temp = new node;

temp->value = inputValue; // assign value to new node

temp->next = NULL; // last node therefore ->next ==NULL

current->next = temp; // join temp with the list (current is last node in the list prior

current = current->next;// current now point to the last node in the list

}

else {

current = current->next;

}

} while (current->next != NULL);

}

void insertBetween(node * List1, int a, int b) {

node*current = List1;

int inputValue;

do {

if (current->value == a && current->next->value == b) {

cout << endl << “Enter value to new node:”;

cin >> inputValue;

node*temp = new node;

temp->value = inputValue;

temp->next = current->next;

current->next = temp;

break;

}

else {

current = current->next;

}

} while (current->next != NULL);

}

node* delete_first(node * root)

{

node *temp = new node;

temp = root;

root = root->next;

delete temp;

return root;

}

void delete_last()

{

node *current = new node;

node *previous = new node;

//current = head;

while (current->next != NULL)

{

previous = current;

current = current->next;

}

//tail = previous;

previous->next = NULL;

delete current;

}

void delete_position(node * root, int pos)

{

node *current = new node;

node *previous = new node;

current = root;

for (int i = 1; i<pos; i++)

{

previous = current;

current = current->next;

}

previous->next = current->next;

}

delete a linked list node Computer Science Assignment Help[supanova_question]

Philosophy of Religion Writing Assignment Help

I. Prompt

(a) Pick one of the three ethical theories we discussed in class (utilitarianism, Kantian ethics,

or virtue ethics). According to this ethical theory, what makes an action obligatory or

prohibited?

(b) Describe a duty to others described in Exodus 20 or the in the

Quran 6:151-153; 17:23-39 .

(c) Explain why we have the duty you described in (b) using the ethical theory you described

in (a).

(d) Explain why, despite this agreement between the ethical theory you described in (a) and

the purportedly divine command you described in (b), some philosophers think that the

ethical theory you described in (a) is not the correct explanation of what makes actions

obligatory or prohibited.

You must support your answers to (a), (c), and (d) with citations from Mill’s Utilitarianism, Kant’s Groundwork, or Aristotle’s Nicomachean Ethics

II. Format

The body of your paper should be at least three pages and no longer than four pages (that is, not including your cover page or works cited page). Your paper should be typed in 12-point Times New Roman font with double spacing between lines, no extra spacing between paragraphs, and one-inch margins on left, right, top, and bottom.

III. Grading Rubric

Thesis (10%)

Exemplary: The paper contains a thesis statement which is clear, follows the prompt, and is the first sentence of the paper.

Proficient: The thesis statement does not follow the prompt or is unclear.

Satisfactory: The thesis statement neither follows the prompt nor is clear.

Basic: The thesis statement is not at the beginning of the paper.

Unsatisfactory: The paper contains no thesis statement.

Content (60%)

Part (a) (15%)

5 The answer is both clear and correct.

4 The answer is clear but not correct.

3 The answer is neither correct nor clear, but is still is not too far off.

2 The answer is way off.

1 No answer is given.

Part (b) (15%)

5 The answer is both clear and correct.

4 The answer is clear but not correct.

3 The answer is neither correct nor clear, but is still is not too far off.

2 The answer is way off.

1 No answer is given.

Part (c) (15%)

5 The answer is both clear and correct.

4 The answer is clear but not correct.

3 The answer is neither correct nor clear, but is still is not too far off.

2 The answer is way off.

1 No answer is given.

Part (d) (15%)

5 The answer is both clear and correct.

4 The answer is clear but not correct.

3 The answer is neither correct nor clear, but is still is not too far off.

2 The answer is way off.

1 No answer is given.

Support (10%)

Exemplary: Answers to (a), (c), and (d) are supported by citations from Mill’s Utilitarianism, Kant’s Groundwork, or Aristotle’s Nicomachean Ethics.

Proficient: A few statements in the Answers to (a), (c), and (d) are not supported by citations from Mill’s Utilitarianism, Kant’s Groundwork, or Aristotle’s Nicomachean Ethics.

Satisfactory: Several statements in the answers to answers to (a), (c), and (d) are not supported by citations from Mill’s Utilitarianism, Kant’s Groundwork, or Aristotle’s Nicomachean Ethics. Basic: Most statements in the answers to (a), (c), and (d) are not supported by citations from Mill’s Utilitarianism, Kant’s Groundwork, or Aristotle’s Nicomachean Ethics.

Unsatisfactory: No statements in the answers to (a), (c), and (d) are supported by citations from Mill’s Utilitarianism, Kant’s Groundwork, or Aristotle’s Nicomachean Ethics.

Spelling, grammar, and word choice (10%)

Exemplary: The paper contains no errors or only a few trivial errors.

Proficient: The paper is understandable but contains minor errors.

Satisfactory: The paper is understandable but contains multiple serious errors.

Basic: The errors make at least one sentence of the paper incomprehensible.

Unsatisfactory: The errors make more than one sentence of the paper incomprehensible.

In-text citations and Works Cited page (10%)

Exemplary: In-text citations and citations on the works cited page are in conformity with APA style.

Proficient: In-text citations and citations on the works cited page deviate from APA style in at least one way.

Satisfactory: In-text citations and citations on the works cited page deviate from APA style in at least two ways.

Basic: There are citations in the text but no works cited page, or there is a works cited page but there are no citations in the text.

Unsatisfactory: There are no citations in the text and there is no works cited page.

The following content is partner provided

[supanova_question]

peer reviw 1 Humanities Assignment Help

My expectation is that a good peer review will be at least 3 pages long and will include meaningful criticisms of the paper and specific suggestions for how it can be improved and completed.

the assignment is to write review of Julie’s draft, (i will attched julie’s paper , ) give her strong advice’s

The specific assignment is:

Explain, in your own words, the research question and hypothesis.

Explain in your own words the key independent variable, opportunity structure. What does Julie mean by this? How will she be able to know it when she sees it? (That is, how will she “operationalize” this variable?)

Explain in your own words how Julie measures opportunity structures in her various case studies. Is her approach consistent? Does it make sense?

Does the way Julie chooses different cases here make sense? Do her cases provide enough variation for her to make meaningful comparisons?

Please come up with some specific suggestions about how Julie can best improve the way she defines and measures the key variables in her cause-and-effect argument.

Are there any other suggestions for improvement you can think of?

[supanova_question]

Comment on the following aspects of the case study: Mathematics Assignment Help

Comment on the following aspects of the case study:

a)
Printing books in a print shop, especially large quantities of a single
book, is a process. A process is an ongoing day-to-day repetitive set
of activities the print shop performs when producing its products. How
are these customized eBooks different from a standard printing process?
What characteristics make these customized eBooks a project?

b) Who are the stakeholders in these eBook projects? How are they involved in or affected by an eBook project?

c)
Why is it important to have a defined project scope? Why is it
important to make sure there is agreement about the scope and what will
be done in producing each eBook?

d) What kinds of information would you want supervisors to have available to them in the Manage Production phase? Why?

e)
Do you think developing a standard job template would be useful for
Global Green Books? Why? What advantages could it give them in planning
work?

f) What other information, if any, would you like to see included in the standard job template? Why?

[supanova_question]

create a 5 E lesson on habitat Health Medical Assignment Help

create a 5 E lesson plan on habitat

SOL 4.5
The student will investigate and understand how plants and animals,
including humans, in an ecosystem interact with one another and with the
nonliving components in the ecosystem. Key concepts include

b) Organization of populations, communities, and ecosystems and how they interrelate;

d) Habitats and niches.

SOL 4.1
The student will demonstrate an understanding of scientific reasoning,
logic, and the nature of science by planning and conducting
investigations in which

a) Distinctions are made among observations, conclusions, inferences, and predictions;

e) Predictions and inferences are made, and conclusions are drawn based on data from a variety of sources;

m) Current applications are used to reinforce science concepts.

you can add other Virginia sols using http://www.doe.virginia.gov/testing/sol/standards_…

I have posted two examples it has to be 5 e model as in the example. MUST use template provided.

I even bought a lesson plan that you can put together and use to help with the plan its labeled you can use this.

It has everything just need you to put together.

use template labeled offical template

[supanova_question]

[supanova_question]

Network Security Paper Computer Science Assignment Help

Network Security Paper: In this paper, you will define the security strategies of Defense in Depth and Layered Security along with comparing and contrasting the strategies by explaining, at least, two advantages and disadvantages of implementing each security strategy. Support your information and make sure all information sources are appropriately cited.

The paper must use APA 6th ed., 7th printing formatting and contain a title page, 3 to 5 pages of content, and a minimum of three peer-reviewed references

Your assignment will be graded based on the rubric, which can be viewed when clicking on the assignment submission link above.

Assignment Resource(s):

Network Security Paper Computer Science Assignment Help[supanova_question]

A project on microsoft access Engineering Assignment Help

Scenario:
Your team is given the project to design a database and associated interfaces for the ISE
department at North Carolina A&T State University to collect and manage the data collected
during each recruitment event. The database will store the information of prospective students
who attended some ISE recruitment event(s), and the information about recruitment events.
For each prospective student, the ISE department wants to collect his/her name (including last
name, first name and middle initial), gender, phone numbers (one or more), one email, and ethnic
group. The database generates a unique ID number for each prospective student. The required
information for each prospective student includes last name, first name, gender, email, and at
least one phone number. The optional information includes middle initial and ethnic group. The
seven pre-defined ethnic groups are White, Hispanic or Latino, Arian, Black or African
American, American Indian or Alaska Native, Native Hawaiian or other Pacific Islander, and
Other.
The ISE department wants to track the following information for each event: type, date, location
(including address, city, state and ZIP), and contact information (including a contact person’s
name, title, email and phone number). The database should generate a unique ID number for
each event. Except for event type, date and location, the other information is optional (refer to
Table 1 for pre-defined event types). More importantly, the database needs to track the participants of each recruitment event. One
prospective student can attend more than one event, and multiple students can attend one event.
The database also stores the classification of each student who attend an event (refer to Table 2
for a list of pre-defined classifications).

[supanova_question]

Sociology reaction paper on book “Heat Wave’ by Eric Kbinenberg on Chapter 2 and 3 Humanities Assignment Help

Weekly Reaction Paper, 2 pages

Each reaction papers should:

1.) Demonstrate that you have completed and understood the main themes of the week’s readings by summarizing the most significant ideas.

2.) Connect the readings’ themes to broader course themes, lectures, and other readings.

3.) Present your reaction to the readings, informed by course materials and your own experiences.

You have freedom in how you approach reaction papers, but here are a few suggestions:

  • Compare and contrast the authors’ arguments in the week’s readings.
  • Draw connections between the reading and your own experience or the experience of people you know.
  • Discuss how you agree or disagree with the author’s point of view and why.
  • Explain the strengths and weaknesses of the author’s argument.
  • Describe why you find the author’s argument interesting, compelling, problematic, etc.
  • Explain how the reading fits into our past or current discussions of urban society.
  • Each reaction paper should contain the same basic information. It should begin with a thesis statement that communicates your focus (i.e. comparing and contrasting authors’ arguments, explaining how the readings are related to your personal experiences, etc.) Your thesis statement should tell the reader what you will be discussing. Your reaction paper should then contain a brief (one paragraph) summary of the main argument of each reading for that week. You should conclude with a 1-2 paragraph reaction to the readings that can take any approach, including the suggestions listed above.

[supanova_question]

c++ coding Programming Assignment Help

In this project, you will write a C++ program to simulate some standard activities and operations that occur within a school system on a set of students in a COSC 113 class. The data below list the students currently registered to the class. There is a class size limit of 25 students. The information below should be stored in a file and then used as input for this project. THIS PROJECT SHOULD ONLY BE DONE USING CONCEPT COVERED IN CLASS. STRUCTS FOR STUDENT DATA STORAGE.

First Name Last Name Major Student ID GPA Phone Number Home City

Jane Porter Math 173894 3.9 4015388833 Arlington

Clarke Griffith Bio 100100 4.0 3018100100 DC

Craig Bellamy Ctec 128490 0.2 2403849399 Bowie

Manny Rhodes Chem 183903 2.9 3203848499 Largo

Robert Reyes Ctec 137940 3.4 4103948929 Bowie

Alexis Rodrigues Hist 128739 3.2 3014732293 Fairfax

Daniel Proctor Ctec 103848 2.5 3019382923 DC

Oliver Kostermann Cosc 193338 3.8 2049238392 Lanham

John Constantine Hist 183779 3.4 3103938493 Alexandria

Nagisa Hiroyama Chem 129030 3.7 2402874748 Lanham

Simone Xypher Bio 193830 4.0 3013849292 DC

Jason Rundelhause Math 139480 0.9 2013874829 Bowie

Abel Herrera Cosc 123999 1.5 3013983722 Falls Church

Connor Angel Hist 197920 3.7 2402879302 Alexandria

Monica Strauss Bio 110030 0.8 4010393849 Greenbelt

Claire Matteo Hist 102837 3.1 2402884893 Largo

Farida Ahmed Cosc 183920 3.0 3019389282 Arlington

David Masterson Hist 127393 1.4 4102937498 Falls Church

Chloe Gignac Cosc 188292 3.7 3102338229 Fairfax

William Tucker Math 198339 0.5 3019912293 Greenbelt

Daniela Moreira Ctec 139300 3.6 2402919933 DC

Birgit Prinz Cosc 109022 3.9 2018473993 Bowie

You are to create a Menu-driven program that runs continuously until the user of the program decides to stop the program. The program will read the input from a file, and output as requested to the screen. Use appropriate function calls where necessary to simplify your program. Your program should ensure the right data is entered, like 6 digits for the ID, and 10 digits for the Phone, not greater than 4.0 for GPA and so on. Phone number should be stored with string because it exceeds the limits of int, and does not require calculation. THIS IS AN INDIVIDUAL PROJECT

The project should contain at least the following functions (you can use more if you need to)

  1. CreateClass – This is a function that reads the student info data above from the file into your appropriate data structure the student names should be in alphabetical order of last name (do not alter the input file). Your function should print the entire student info (best to call the print function for this), and show the current number of students in the class (class count).
  2. RegisterClass – This is a function that allows a student to register for the COSC 113 class, by providing all the necessary information (first name, last name, major, studentID, GPA, PhoneNumber, HomeCity). The new student info should be placed into the correct position. Your function should then display the current class count. Note, if the class is full, it should prevent a new student from registering with an appropriate message. Print the list to show that your class is still sorted. Also your function should not be case sensitive.
  3. DropClass – This is a function that provides a student the opportunity to drop the class. The student need only provide a unique information like their studentID or PhoneNumber. Your function should ask the student to provide any of the two. If the student is not registered for the class, display an appropriate message. Print the new class list to show the result of the drop and show the class count.
  4. SortClass – This is a function to print out the class list in a sorted manner. The class can be sorted by Firstname, StudentID, HomeCity or GPA. Your function should ask the user for the sorting order they prefer and sort accordingly. You can choose to make this question into multiple functions for each sort, or one function. You are also free to use any of the sorting algorithms we covered. Print the sorted list.
  5. UpdateInfo – This is a function that allows the student the opportunity to update any of their information that might have changed or was entered incorrectly. It should give the user the chance to select which information to update, and allow them update it, it should then ask if the user has anything else to update, if they do, it repeats if they don’t, print the new class list to reflect the updated data, and the class count.
  6. PrintClass – This is a function that prints the entire student info in the class list, using the default sorting (by last name). It also displays the class count.
  7. DisplayGPA – This is a function that takes from the user a certain GPA, and a choice, and displays the complete info of every student with GPA below or above that value depending on their choice. Also display a count for the number of students
  8. DisplayBestMajor – This is a function that displays the name of the department with the highest average GPA for its students and the GPA average for the department. Also display a count for the number of students
  9. DisplayDepartment – This is a function that takes from the user a certain Major, and displays the complete info of every student in that major. Also display a count for the number of students
  10. DisplayState – This is a function that takes from the user a certain state, and displays the info of all the student from that state(e.g Maryland, Virginia). Also display a count for the number of students


SearchStudent – This is a function that given unique info like the studentID or Phone Number, it should be able to search the class list if the student is currently registered or not. If the student is registered, display their complete info. If not, display an appropriate message. You function should work for either an ID or a Phone Number.

DeansList – This is a function that prints out the entire info for any student who meets the requirement for being in the Dean’s List. Make the requirement a 3.7 GPA and above. Display a count for the number of students

BestStudent – This is a function that prints out the entire info of the student(s) with the highest G.P.A

WorstStudent – This is a function that prints out the entire info of the student(s) with the lowest GPA

ProbationList – This is a function that prints out the entire info for any student who meets the requirement for being on the probation list. Make the requirement a GPA of 1.0 or below. Display a count for the number of students.

DisplayStudent – This is a function that takes in a city from the user and displays the complete student info of all the students who do not belong to that city. Display a count for the number of students.

DisplayMajorCount– This is a function that takes in a choice from the user and based on the user’s choice prints the name and student count of the department with the highest or lowest number of students. If two departments have the same count, print both of them along with their count.

[supanova_question]

edit the following program based on the instructions. Programming Assignment Help

in this assignment, you will edit the program below.

do not use an object for this program.

import java.util.Scanner;
public class Renovation2
{

//Variables
private static double paintingCostPerSqFt=1;

private static double flooringWithLinoleumTileCost=1;

private static double flooringWithCarpetCost=2;

private static double flooringWithHardwoodCost=3;

private static double flooringWithCeramicTileCost=4;

private static double r_length, r_width, r_height, d_width, d_height ;

private static double door_area = 0;

private static double w_width; //Window1 Width

private static double w_height; //Window1 Height

private static double window_area = 0;

private static double b_width; //Bookshelf Width

private static double b_height; //Bookshelf Height

private static double b_depth; //Bookshelf Depth

private static double self_area = 0;

private static double self_floor_area = 0;

private static int customerPreferenceRenovation1=0;

private static double customerBudgetRenovation1;

private static int customerPreferenceRenovation2=0;

private static double customerBudgetRenovation2;

private static int customerPreferenceRenovation3=0;

private static double customerBudgetRenovation3;

public static void main(String args[])
{

//To get the user input from the console
Scanner sc = new Scanner(System.in);

//Carpeting and Painting includes Room, Door and Windows
//Getting the measurements from the user for all three – Room, Door, Windows, BookShelf
System.out.println(“Enter Room length, width and height respectivly :”);
r_length = sc.nextDouble();
r_width = sc.nextDouble();
r_height = sc.nextDouble();

//Getting number of Doors
System.out.println(“Enter number of doors : “);
int no_of_door = sc.nextInt();
for(int i = 0;i<no_of_door;i++){
System.out.println(” Enter Door”+(i+1)+” width and height :”);
d_width = sc.nextDouble();
d_height = sc.nextDouble();
door_area = door_area + calculateDoorArea(d_width,d_height);
}

//Getting width and height for the first Window
System.out.println(“Enter how many windows : “);
int no_of_window = sc.nextInt();
for(int i = 0;i<no_of_window;i++){
System.out.println(” Enter window”+(i+1)+”‘s width and height :”);
w_width = sc.nextDouble();
w_height = sc.nextDouble();
window_area = window_area + calculateWindowArea(w_width,w_height);
}

//Getting dimensions of the bookshelf
System.out.println(“Enter how many Bookshelf : “);
int no_of_bself = sc.nextInt();
for(int i = 0;i<no_of_bself;i++){
System.out.println(“Enter bookshelf width, height,depth :”);
b_width = sc.nextDouble();
b_height = sc.nextDouble();
b_depth = sc.nextDouble();
self_area = self_area + calculateBookShelfArea(b_width,b_height);
self_floor_area = self_floor_area + calculateBookShelfFloorArea(b_width,b_depth);
}

//Calculate all the Areas
double r_area=calculateRoomArea();
double r_floor_area = calculateRoomFloorArea();

//Calculate Total area for painting and carpeting
double total_area_painting = r_area – (window_area + door_area + self_area);
double total_area_carpeting = r_floor_area – self_floor_area;
double total_cost_painting = calculatTotalPaintingCost(total_area_painting);

//assigning number to preferences
System.out.println(“Flooring Preferences::”);
System.out.println(“0-Anything is Fine”);
System.out.println(“1-Ceramic Tile”);
System.out.println(“2-Hardwood”);
System.out.println(“3-Carpet”);
System.out.println(“4-Linoleum Tile”);

System.out.println(“For Renovation 1 : Please enter the flooring preference as above and also the total budget:”);
customerPreferenceRenovation1 = sc.nextInt();
customerBudgetRenovation1 = sc.nextDouble();
String customerPreferenceRenovation1AsText = displayCustomerFlooringPrefAsText(customerPreferenceRenovation1);
System.out.println(“You have chosen for flooring for Renovation1: “+customerPreferenceRenovation1AsText);
System.out.println(“Your Expected Budget for Renovation1: “+customerBudgetRenovation1);
System.out.println(“Our Actual Budget For Painting for Renovation1: “+total_cost_painting);
System.out.println(“Our Actual Budget For Flooring for Renovation1: “+calculateTotalFlooringCostBasedOnCustomerPreference(customerPreferenceRenovation1,total_area_carpeting));
System.out.println(“For Renovation 2 : Please enter the flooring preference as above and also the total budget:”);
customerPreferenceRenovation2 = sc.nextInt();
customerBudgetRenovation2 = sc.nextDouble();
String customerPreferenceRenovation2AsText = displayCustomerFlooringPrefAsText(customerPreferenceRenovation2);
System.out.println(“You have chosen for flooring for Renovation2: “+customerPreferenceRenovation2AsText);
System.out.println(“Your Expected Budget for Renovation2: “+customerBudgetRenovation2);
System.out.println(“Our Actual Budget For Painting for Renovation2: “+total_cost_painting);
System.out.println(“Our Actual Budget For Flooring for Renovation2: “+calculateTotalFlooringCostBasedOnCustomerPreference(customerPreferenceRenovation2,total_area_carpeting));
System.out.println(“For Renovation 3 : Please enter the flooring preference as above and also the total budget:”);
customerPreferenceRenovation3 = sc.nextInt();
customerBudgetRenovation3 = sc.nextDouble();
String customerPreferenceRenovation3AsText = displayCustomerFlooringPrefAsText(customerPreferenceRenovation3);
System.out.println(“Your have chosen for flooring for Renovation3: “+customerPreferenceRenovation3AsText);
System.out.println(“Your Expected Budget for Renovation3: “+customerBudgetRenovation3);
System.out.println(“Our Actual Budget For Painting for Renovation3: “+total_cost_painting);
System.out.println(“Our Actual Budget For Flooring for Renovation3: “+calculateTotalFlooringCostBasedOnCustomerPreference(customerPreferenceRenovation3,total_area_carpeting));
System.out.println(total_area_painting + total_area_carpeting);
}

//calculating area and returning values
public static double calculateRoomArea()
{
return 2*r_length * r_height + 2 * r_height * r_width + r_length * r_width;
}
public static double calculateDoorArea(double width,double height)
{
return height*width;
}
public static double calculateWindowArea(double width,double height)
{
return height*width;
}
public static double calculateBookShelfArea(double width,double height)
{
return height*width;
}
public static double calculateBookShelfFloorArea(double width,double depth)
{
return depth*width;
}
public static double calculateRoomFloorArea()
{
return r_length*r_width;
}
public static double calculatTotalPaintingCost(double totalAreaPainting)
{
return totalAreaPainting*paintingCostPerSqFt;
}
public static double calculateTotalFlooringCostBasedOnCustomerPreference(int customerFlooringPreference, double totalAreaCarpeting)
{
double calculatedFlooringCost;
switch(customerFlooringPreference)
{
case 1:
calculatedFlooringCost = calculateTotalCeramicTileFlooringCost(totalAreaCarpeting); //Cost=4$/Sq.ft
break;
case 2:
calculatedFlooringCost = calculateTotalHardwoodFlooringCost(totalAreaCarpeting); //Cost=3$/Sq.ft
break;
case 3:
calculatedFlooringCost = calculateTotalCarpetFlooringCost(totalAreaCarpeting); //Cost=2$/Sq.ft
break;
case 4:
calculatedFlooringCost = calculateTotalLinoleumTileFlooringCost(totalAreaCarpeting); //The least expensive one Cost=1$/Sq.ft
break;
default:
calculatedFlooringCost = calculateTotalCeramicTileFlooringCost(totalAreaCarpeting); //The most expensive one Cost=4$/Sq.ft
}
return calculatedFlooringCost;
}
public static double calculateTotalCeramicTileFlooringCost(double totalAreaCarpeting)
{
return totalAreaCarpeting*flooringWithCeramicTileCost;
}
public static double calculateTotalHardwoodFlooringCost(double totalAreaCarpeting)
{
return totalAreaCarpeting*flooringWithHardwoodCost;
}
public static double calculateTotalCarpetFlooringCost(double totalAreaCarpeting)
{
return totalAreaCarpeting*flooringWithCarpetCost;
}
public static double calculateTotalLinoleumTileFlooringCost(double totalAreaCarpeting)
{
return totalAreaCarpeting*flooringWithLinoleumTileCost;
}

//showing preferene if the customer chooses anything(0)
public static String displayCustomerFlooringPrefAsText(int flooringPrefNumber)
{
String flooringPreference =”Anything is fine”;
switch(flooringPrefNumber)
{
case 1:
flooringPreference =”Ceramic Tile”;
break;
case 2:
flooringPreference =”Hardwood”;
break;
case 3:
flooringPreference =”Carpet”;
break;
case 4:
flooringPreference =”Linoleum tile”;
break;
default:
flooringPreference =”Anything is fine”;
}
return flooringPreference;
}//end of main
}//end of class

*************************************

here is what i have until now. and this is the next assignment.

Put all home works together and use methods to simplify code. Also expand to have preferences and budget for wall coverings the way that was done for floor options

Use separate Methods to calculate the change for area covered for each the Door, Window and Bookcase (Hint – you may want to use 2 methods for the book case effects since one is floor and other is wall). Also use method to determine floor covering option and wall covering option.

The user shall input the dimensions of the room and the eventual output will be how the walls and flooring is done and how much budget is left.

The user will input the number of doors, windows, and bookcases and the dimensions of each which will be used to adjust the total wall and floor space needed to be covered. The system will output the square feet of wall and floor after adjustments.

The user will be asked for his budget for the walls and if he has a preference for the type of material for the wall. The system will accept as input the costs for the different wall coverings and determine which wall covering the user can afford – being either his preference or the most expensive he can afford if he does not have a preference. It’s also possible the user can not afford any wall coverings. The budget left after the wall covering is kept for how much money is left.

The system will output the initial budget for walls, the selected option and cost of what the user can afford and what is left in the budget for walls.

The same process will work for floor coverings with the same output for flooring.

YOU also have COST OPTIONS FOR WALLS, A USER PREFERENCE AND A BUDGET, YOU WILL DO THE SAME FOR THE WALL as floors. SAME RULES APPLY – IF 0 THEN JUST PICK MOST EXPENSIVE, IF PREFERENCE GIVE PREFERENCE IF CAN AFFORD, IF NOT GIVE WHAT CAN AFFORD.

There are four options for wall cover (Ceramic Tile = 1; Paneling = 2, Wallpaper = 3; and paint = 4) each with a cost per square foot The program will ask for input and read in the budget in dollars and cents, the cost per square foot for each of the different wall options and also ask for which one the customer prefers where 0 means the customer does not care and 1-4 if they have a specific preference.

Output the users preference, their budget, if they got their preference, and what they did get. Also how much budget is left.

You will be graded on how well you map this to methods and how good the comments are explaining what the program does.

Use the following for data (it is the same as HW 3 so you should get the same selection answers for flooring as you get there.

First renovation project (THREE DOORS, ONE BOOKSHELF, NO WINDOWS)

o Room is 12 feet long, 12 feet wide, and 12 feet high

o Door 1 is 2 feet wide by 10 feet high

o Door 2 is 3 feet wide by 5 feet high

o Door 3 is 3 feet wide by 5 feet high

o Bookshelf is 8 feet long by 10 feet high by 2 feet deep

o No windows

Second renovation project (3 WINDOWS, 2 BOOKSHELFS, NO DOORS)

o Room is 24 feet long, 12 feet wide, and 8 feet high

o Window 1 is 2 feet wide by 6 feet high

o Window 2 is 3 feet wide by 5 feet high

o Window 3 is 8 feet wide by 5 feet high

o Bookshelf 1 is 8 feet long by 6 feet high by 3 feet deep

o Bookshelf 2 is 3 feet long by 6 feet high by 2 feet deep

o No doors

Third renovation project (ONE DOOR, 2 WINDOWSS, ONE BOOKSHELF)

o Room is 12.75 feet long, 11.25 feet wide, and 12 feet high

o Door is 1.95 feet wide by 10 feet high

o Window 1 is 2.5 feet wide by 5 feet high

o Window 2 is 6.8 feet wide by 7.2 feet high

o Bookshelf is 8 feet long by 6 feet high by 3 feet deep

For Flooring use:

Tile= $4.00 /sq ft; Wood = $3.00/ sq ft; Carpet = $2.00/ sq ft and linoleum = $1.00/sq ft).

Use the following as the budget and preference:

Budget/preference

Renovation 1

Renovation 2

Renovation 3

User preference

0

1

3

Budget

255.00

250.00

400.00

There are four options for wall cover (Ceramic Tile = 1; Paneling = 2, Wallpaper = 3; and paint = 4) each with a cost per square foot

For all three test renovation projects use Tile= $4.00 /sq ft; Paneling = $3.00/ sq ft; Wallpaper = $2.00/ sq ft and paint = $1.00/sq ft).

Use the following as the budget and preference:

Renovation 1

Renovation 2

Renovation 3

User preference

0

4

3

Budget

1200.00

250.00

6000.00

For Flooring use:

Tile= $4.00 /sq ft; Wood = $3.00/ sq ft; Carpet = $2.00/ sq ft and linoleum = $1.00/sq ft).

Use the following as the budget and preference:

Budget/preference

Renovation 1

Renovation 2

Renovation 3

User preference

0

1

3

Budget

255.00

250.00

400.00

There are four options for wall cover (Ceramic Tile = 1; Paneling = 2, Wallpaper = 3; and paint = 4) each with a cost per square foot

For all three test renovation projects use Tile= $4.00 /sq ft; Paneling = $3.00/ sq ft; Wallpaper = $2.00/ sq ft and paint = $1.00/sq ft).

Use the following as the budget and preference:

Renovation 1

Renovation 2

Renovation 3

User preference

0

4

3

Budget

1200.00

250.00

6000.00

[supanova_question]

delete a linked list node Computer Science Assignment Help

delete a linked list node Computer Science Assignment Help

× How can I help you?